Conversation
|
@Ericson2314, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @errge, @gridaphobe, @LnL7 and @copumpkin to be potential reviewers. |
|
Hey @Ericson2314, I'd say this on IRC but it looks like you disconnected: thanks a ton for doing all this refactoring work! The cross compiling stuff has looked a little sketchy for a while, and I'm really looking forward to seeing the wrinkles ironed out. 🍻 Oh, and Happy Holidays! |
ffc6957 to
7fdf2ab
Compare
|
Bit busy with the holidays, but will review this when I get the chance! |
7fdf2ab to
de2868b
Compare
|
Review started, will probably take a few days to finish going through it all |
|
@shlevy Thanks so much! Oh and to be clear, I've written it with the intention of a commit-by-commit review, which should make it more bights but each one less of a mouthful. |
|
@shlevy friendly ping :) |
pkgs/stdenv/booter.nix
Outdated
There was a problem hiding this comment.
Please document this or, if its use should be obvious from context, move it to a let at the top so it's not exported.
pkgs/stdenv/booter.nix
Outdated
There was a problem hiding this comment.
This doesn't match the comment ("all but the final stage") if the list has the stages in order...
There was a problem hiding this comment.
Oh whoops! Yeah originally I had reverse order.
shlevy
left a comment
There was a problem hiding this comment.
Can't seem to approve commits separately, 👍 on "top-level: Inherit system and platform in stage.nix not all-packages.nix"
shlevy
left a comment
There was a problem hiding this comment.
Review of "top-level: Modernize stdenv.overrides giving it self and super"
Please find some place (perhaps the nixpkgs manual changelog?) to document this change.
Otherwise 👍
shlevy
left a comment
There was a problem hiding this comment.
Review of "top-level: Do stdenvOverrides in stage.nix even if crossSystem exists.":
Expand in commit message why the previous comment no longer applies.
pkgs/top-level/stage.nix
Outdated
There was a problem hiding this comment.
Why doesn't this comment apply any more?
There was a problem hiding this comment.
In commit message, basically the cross stdenv cleans up after itself rather than leaving stage.nix to do it.
shlevy
left a comment
There was a problem hiding this comment.
Review of "linux stdenv: Utilize overrides and prevStage better":
Why does this change gcc.cc to gcc-unwrapped?
shlevy
left a comment
There was a problem hiding this comment.
Review of "linux stdenv: Remove stray use of stage0 to bootstrap more elegantly"
Can you explain the role of ccWrapperStdenv in this commit?
shlevy
left a comment
There was a problem hiding this comment.
Review of "linux stdenv: Inline stage funs to conform to new convention"
Diff is too hard to verify, but if all this is is code shuffling to meet the new standard then 👍
|
Thanks!! Will get to work on these right away |
|
I'm going to make those changes, make extendStages actually |
|
Well I'd like to see the explanation for why this new abstraction is better first... |
|
@shlevy Sure, I was including that in this list of things to do, but yeah that deserves a re-review. |
Document breaking change in 17.03 release notes
3f71837 to
af101e1
Compare
|
As a bonus, the big inline commit is now less indented causing less churn. |
pkgs/stdenv/booter.nix
Outdated
There was a problem hiding this comment.
See the reverse below?, and then foldr not foldl?
There was a problem hiding this comment.
👍 Not a big deal, but maybe change the comment on this line?
pkgs/stdenv/booter.nix
Outdated
There was a problem hiding this comment.
Should maybe document somewhere that this function doesn't add __bootPackages when __raw == true
There was a problem hiding this comment.
Oh whoops, that's not intentional. Not supposed to be that raw :).
pkgs/stdenv/cross/default.nix
Outdated
There was a problem hiding this comment.
No need to change this, but can you explain the termination issue when replaceStdenv is there?
There was a problem hiding this comment.
Ooops, old comment should still be there, bad copy paste from custom/default.nix
pkgs/top-level/default.nix
Outdated
pkgs/top-level/stage.nix
Outdated
Introduce new abstraction, `stdenv/booter.nix` for composing bootstraping stages, and use it everywhere for consistency. See that file for more doc. Stdenvs besides Linux and Darwin are completely refactored to utilize this. Those two, due to their size and complexity, are minimally edited for easier reviewing. No hashes should be changed.
Instead, the cross stdenv will patch up the override field -- the complexity is now confined to the one place it matters.
…ges.nix These are not packages, and so its more elegant to do this outside of all-packages.nix.
`gcc-unwrapped` basically replaces `gccPlain`. It may seem like an ugly polution to stick it in all-packages, but a future PR will enshrine this `*-unwrapped` pattern. In any event, the long term goal is stdenvs might need to tweak how compilers are booted and wrapped, but the code to build the unwrapped compilers themselves should be generic.
Code is just moved around
af101e1 to
ff35560
Compare
|
Linux tests passed (which do eval darwin), darwin job seems to have a backlog, I'm merging 😀! |
Split out from #21268
This PR introduces a new abstraction for dealing with stdenv bootstrapping. It doesn't really make anything shorter, but at least it enforces a consistent ideom across all of them. I've made all the stdenvs but darwin really embrace the new abstraction. Darwin is a bit bigger, and so I made minimal changes to make it use it, but I'll refactor it to make it embrace the new abstraction too if wanted.
#21268 builds on this to make cross compiling not a dirty hack.