-
Notifications
You must be signed in to change notification settings - Fork 441
Migrate examples to snippets #1069
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
base: main
Are you sure you want to change the base?
Conversation
@swift-ci please test |
What about the |
We can probably just remove them, to make the scripts a bit less noisy. Not sure about the CI failure, the build script builds the snippets just fine on my machine. |
There's also something strange going on with the libraries snippets link with. When I run
I think the issue could be that snippets always try to link all targets, which in this case includes the test support target. |
Oh, this is super annoying. @bitjammer Do you know if there is any way to make the snippets only link against specific targets to avoid this issue? |
There isn’t currently a way to specify that. However, is the test support target a product? I recently ran into this issue and I have a todo item to only automatically link product libraries in this way. Would that help here? |
I think that would solve the problem here. |
I've opened swiftlang/swift-package-manager#5929 to address this problem if you would like to give it a spin with this PR. |
As per the Python convention
This fixes an error when invoking the build script without arguments.
23d878f
to
24e0ff4
Compare
swiftlang/swift-package-manager#5929 @swift-ci Please test |
Looks like we uncovered another issue, I believe this may have been caused by c1bfac62d536d8cfce6cd6e7b85d2bd7ec2b98a9 – looking into it now. |
swiftlang/swift-package-manager#5931 @swift-ci Please test |
Cool, looks like swiftlang/swift-package-manager#5931 will unblock you. Thanks for your patience while I worked out those issues. |
✅ All swiftpm blockers landed on main. |
Very nice, thanks for looking into this! |
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 think we still need to wait for the SwiftPM changes to land in Xcode before we can merge this. I’m marking the PR as ”Request changes” to make sure we don’t accidentally merge it.
Now that Xcode 14.1 has been released, there shouldn't be any issues with SwiftPM snippets anymore, therefore this PR migrates the examples folder to snippets again (thus superseding #531).
Additionally this PR renames the
buildProduct
method tosnake_case
again, as per the Python convention, and fixes a minor issue where the build script would throw an error when invoked without arguments (instead of producing a proper help message).cc @ahoppen @SimplyDanny