-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
llvmPackages_{12,13,14,15,16,17,18,19,git}: commonify patches #333521
Conversation
bcf4187
to
b81329c
Compare
35a04f0
to
721aaa8
Compare
721aaa8
to
4fb416d
Compare
LLVM 14's clang purity patch was removed as it is a duplicate of 12's.
Swift build failures can be ignored as they are happening on Hydra as well. It looks like it at least passes 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.
This is fantastic work — look at all those deletions! Thank you!
I'm just wondering if there's a better way to express it…
@@ -74,7 +74,98 @@ let | |||
p: | |||
builtins.path { | |||
name = builtins.baseNameOf p; | |||
path = "${metadata.versionDir}/${p}"; | |||
path = |
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.
This big nested conditional is not great — I think maybe it indicates that getVersionFile is not the right abstraction. Maybe it'd be better to just have a list of patches for each major LLVM version?
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.
Maybe but there's conditional patches and some patches are the same between versions while having different siblings. I was thinking of doing an attr set and have it work like a table but I found it to be simpler to do it this way.
I was thinking of doing a PR to clean up the common default.nix so it wouldn't be as sloppy. Probably in that one, I could have an attr set of versions and values which could be a string or null which then matches into figuring out where that patch will be.
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 was thinking of doing an attr set and have it work like a table
This is what I was thinking of. Was the problem just that you'd have to repeat the patch of a patch multiple times to say that different versions have the same patch? If so, I think that would be easier to understand overall.
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.
Maybe, I'm not sure.
95c874f
to
521356c
Compare
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.
This is still very complicated, but it's better, and maybe there's just not a better way (apart from upstreaming the patches, of course).
Collapsing the attrsets into single lines (if that's allowed by formatting rules) might help, by making it a bit denser.
Yeah, I originally did that but the formatter changed it. |
Before we merge, I want to be able to reproduce and fix that CI error. However, I tried and couldn't get it to fail locally. |
521356c
to
e6cbf08
Compare
Well, by-name passed so we should be gtg now. |
e6cbf08
to
26fd253
Compare
path = ../13; | ||
} | ||
]; | ||
"compiler-rt/gnu-install-dirs.patch" = [ |
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.
possible error here?
26fd253
to
77f6edf
Compare
Description of changes
Reduce the number of patches we have by finding duplicates. Modify
getVersionFile
incommon/default.nix
to branch to min/max version patches so we only have to keep 1 copy of a specific version of a patch.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/
)Add a 👍 reaction to pull requests you find important.