-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PkgConfig] Avoid creating dummy dependency #5741
Conversation
This can be seen in some awkwardly generated .pc files and it can crash SwiftPM silently at least on Windows.
this seems fine to me. @neonichu ? |
LGTM, but I'm curious about the "silent crash" that is mentioned. What exactly happens and is there more to fix around that? |
From my experience Swift programs are very likely to crash silently with edge cases on Windows, and there could be various reasons. The simplest one is caused by lacking runtime library, and it’s easy to find because although CMD won’t emit anything, the GUI shell can tell you what is missing. The others are really hard to debug because LLDB works not so well on Windows. I can remember of silent crashes related to stack overflow and invalid system calls. When I first worked on Swift Driver test suite, the test always crashes at a specific function call and I can’t tell why🤷♂️ |
e02f8dc
to
a4f3d67
Compare
I suspect this one to be solved by swiftlang/swift-tools-support-core#175, which introduces a fix to avoid creating empty path on Windows since the current implementation of I’ve been pushing this PR for years, and just as curious why it still doesn’t get merged🤷♂️ |
@neonichu One thing I can think of to help with crashes is to make verbose mode even more verbose and configurable. |
@stevapple @neonichu what do we need to do to take this forward? |
I think this change makes sense by itself. |
@swift-ci please smoke test |
Dummy dependency can be seen in some awkwardly generated
.pc
files and it can crash SwiftPM silently at least on Windows.Motivation:
To enhance robustness and avoid silent crashes on Windows.
Modifications:
Ignore parsed dependency with an empty name from a
.pc
file.Result:
SwiftPM will not crash when parsing dependency list like
dep1, , dep2
.