pkgs/development/compilers/llvm: add replacement entrypoint using mak…#436350
pkgs/development/compilers/llvm: add replacement entrypoint using mak…#436350RossComputerGuy wants to merge 2 commits intoNixOS:masterfrom
Conversation
|
Why do we need two implementations of this at the same time? |
|
|
Then let's have a world rebuild? |
bd28e9d to
26c5ff1
Compare
Done |
46b5746 to
3a5d89d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
3a5d89d to
7f751ba
Compare
66ff34e to
acd183d
Compare
|
Ok, I've done some cleaning up on the ordering and it should be closer to a readable diff. It falls apart when it gets to where |
|
I would really like to see this down to 0 rebuilds. For a PR like this, every rebuild is a regression that we need to figure out. Even if the refactor uncovers previously‐incorrect behaviour or things that can be improved, it’s better to do those separately so that we can demonstrate that we can achieve the same behaviour through nicer mechanism without affecting the jobset (and avoid expensive rebuilds, in the case of ROCm). Can it not be minimized just by adjusting the overrides in the ROCm tree? Definite +1 for using a proper scope here in general though. |
It cannot as there's something with splicing going on because of how overrides change. The version attribute was different between the host or target, not entirely sure but that's what |
|
Is splicing involved here? My understanding was that ROCm doesn’t use the Nixpkgs cross functionality at all, so splicing should have no effect. |
| # Needs "libcxx/utils/merge_archives.py" | ||
| + lib.optionalString (lib.versions.major release_version == "13") '' | ||
| cp -r ${monorepoSrc}/libcxx "$out" | ||
| '' |
There was a problem hiding this comment.
Was this previously being injected by override or something? I’m not seeing it in this PR.
I’m dropping LLVM 12–17 this week, so I don’t think we need to spend time fixing existing issues with LLVM 13 (and it goes against making this zero rebuilds).
There was a problem hiding this comment.
I'm not sure, that's what confused me.
There was a problem hiding this comment.
Oh, now I know what it is. llvmPackages.compiler-rt.src was literally the entire Git repo shoved in and not this special one we generate here.
I think it's something that |
|
#440273 will solve the LLVM 12 and 13 rebuilds, at least. The eval comparison currently shows this PR as removing As far as ROCm goes, it seems like the two options would be to change its overrides in this PR to produce the same result (e.g. maybe overriding |
|
Applying the extra commit in #440697 gets rid of the rocmPackages rebuild. If that seems like an acceptable way to unblock this it works for me. I can follow up with a rocmPackages rebuilding PR that drops the bug-for-bug rebuild avoidance. |
|
The big whitespace diff makes it hard to tell; is it just overriding the inputs so that the overrides only happen at the top level? If so it seems reasonable to me. |
I've split it into two parts to make it easier to view and attempted to minimize the number of touched lines.
If it's possible to structure this so nixfmt doesn't want to indent everything further and avoid the reformat commit that would be nice, I couldn't figure it out. |
|
Yeah, that looks good to me, and adding it to this PR seems like a good fix. I’m curious why you need the I have no idea why |
On further investigation I shouldn't need to change that. I accidentally exposed new attributes from the original scope such as
That will make the ROCm 6.4.x bump PR less annoying for future me to rebase so I kinda prefer going with that. Third attempt: 76144e608f19b1a83af3b2b531c418c486a4b2ad |
|
Don't do that |
augh. Can I do something like below or do I need a large pile of let overridenScope = (llvmPackagesRocm.overrideScope (final: prev: f { inherit final prev; })); in {
inherit (overridenScope)
a
b
...
;
} |
|
Yeah that's fine, since it just desugars to the same pile. |
|
Fixed in 47393c7 Is it a problem that there are a lot of |
|
Yes, I think so :( But really it’s just a Nix implementation problem and should ideally be fixed there. |
@emilazy I thought this had been fixed since Lix 2.90 and CppNix 2.21. Is this concern just for those still running CppNix <2.21? |
|
Hmm, I was even just glancing at that code a few days ago but didn’t realize it seems to do the right thing now. That’s nice. Maybe it’s fine, then. |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
This was included in #445668 which was merged. |
…eScopeWithSplicing'
Things done
To test:
Edit
pkgs/top-level/all-packages.nix, find thecallPackageforpkgs/development/compilers/llvm. Add inuseNG = trueand test eval onllvmPackages_*.Plan:
default-ng.nixintodefault.nixI believe it's likely this could cause a world rebuild since I did remove a bunch of
extraBuildCommandsstuff to make it easier to maintain.passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.