-
Notifications
You must be signed in to change notification settings - Fork 77
Fixing up SDK behavior #293
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
Conversation
cc @adam-fowler |
case "package": | ||
switch (args[1]) { | ||
case "dump-symbol-graph": | ||
case "diagnose-api-breaking-changes": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any harm in including the --sdk command line parameter even when it isn't needed. What's to say another package command requires the sdk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to add them explicitly (since they're part of SwiftPM release). Adding unnecessary SDK flags has no effect I guess, but it will make the command line long and confusing (especially when the destination flags accumulate).
@adam-fowler Ping again for this and #294 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple comments, otherwise it looks fine
One thing I don't get, you seem to be prepping the code to debug with a custom SDK (ie looking for xctest.dll in custom SDK), but consider running a swift script with the same custom SDK as something undesirable.
Secondly has this been tested with a custom SDK, plus does the test explorer still work (with/without a custom SDK) after these changes, similar changes broke the test explorer before.
In most cases, cross-compiled binaries cannot run on the host. (BTW, XCTest is not actually in the Windows SDK. We're just regarding SDKROOT as an anchor (starting point) for the searching. All these are following the current SwiftPM implementation.) If something is known to be run on the host (Swift package manifest, SwiftPM plugin, Swift scripts...), it should stick to use host SDK, and overriding should take |
At least everything works perfectly on macOS. On Windows I haven't got a real secondary SDK yet, and custom |
Currently we have two points where the decision on sdk flags being added. The EDIT: Ignore this I see you have removed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're good
swift-package
usually doesn't require SDK flag;