-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
Revert to using 'swift build' with sandbox disabled for 'rake build' #1057
Merged
krzysztofzablocki
merged 2 commits into
krzysztofzablocki:master
from
liamnichols:ln/use-swift-build
Apr 22, 2022
Merged
Revert to using 'swift build' with sandbox disabled for 'rake build' #1057
krzysztofzablocki
merged 2 commits into
krzysztofzablocki:master
from
liamnichols:ln/use-swift-build
Apr 22, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
looks good to me |
🤞 should be as long as the CI checks pass 👍 Seems to work locally though |
I'm not sure of the proper way to test a formulae, but I created a test release on my fork and updated homebrew-core locally and can confirm that it worked:
|
@krzysztofzablocki: When officially updating the formula, there are two things to note:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
When using a statically built version of lib_internalSwiftSyntaxParser in #1037, SR-15802 prevented us from using
swift build
when specifying multiple architectures to build a universal (fat) binary.The initial workaround was to instead use
xcodebuild
, which seemed to work well up until we tried to push the new version to Homewbrew becausebrew install
appears to run in a sandbox, some of the SPM build operations were blocked (I'm a little fuzzy on the exact details).To work around this, we need to revert back to using
swift build --disable-sandbox
when runningrake build
.Description
In this change, I decided to follow the approach that I saw being used in the SwiftLint project. For thin builds, we just run
swift build --disable-sandbox -c release
to build for the machine architecture with no problem. For universal builds, we invokeswift build
for each architecture and then uselipo
to merge the two binaries into a single universal binary and strip any redundant symbols.