-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift: force-unwrap file handles in swift-tools-support-core
#269015
Conversation
swift-tools-support-core
swift-tools-support-core
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.
The file handles are guaranteed to be non-nil
at the point of unwrapping (otherwise the defer statements would not be reached) so force unwrapping them is sane.
I've tested the commits from this PR locally (rebased onto current nixos-unstable) on my Linux x86_64 machine and swift-tools-support-core
and with it also swiftpm
build for me and can be used to successfully build a swift package.
Thanks for making the PR :)
Can we get an urgent merge on this please? Swift has now been broken for over a month... |
+1 for urgency. Is there anything any of us can do to help this get merged faster? |
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.
Sorry for the delay. Maybe the Swift toolchain needs some more maintainers, in light of this.
The change looks good, though.
Probably not wrong @stephank -- I'd volunteer myself but I don't know enough about the toolchain to be anywhere near maintainer lmao |
Result of 2 packages failed to build:
5 packages built:
|
Similar error for both failed packages:
|
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 this is fine for now. We should probably find a better structure for patches in shared swiftpm deps within the toolchain, but I'd rather have things working soon.
patchFlags
may be able to replace the swiftpmMakeMutable
hack, I'm not sure. It may not have been around when the swiftpm code was written. But I think that's something we should look at separately as well.
Description of changes
Fixes the following build errors:
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Priorities
Add a 馃憤 reaction to pull requests you find important.