by-name-overlay: enable structuredAttrs, strictDeps and parallelBuilding for some directories#483445
by-name-overlay: enable structuredAttrs, strictDeps and parallelBuilding for some directories#483445qweered wants to merge 9 commits into
structuredAttrs, strictDeps and parallelBuilding for some directories#483445Conversation
52f2e60 to
e6cf7c8
Compare
Review dismissed automatically
e6cf7c8 to
abcec42
Compare
structuredAttrs, strictDeps and parallelBuilding for some directories
33a043b to
ec4dd07
Compare
f19587a to
61d2dca
Compare
61d2dca to
af6e82d
Compare
1ef2cc1 to
af09e57
Compare
|
|
Failures are pre existing: |
af09e57 to
b84046c
Compare
|
Love to see those features ( From a somewhat selfish perspective: I'm working in the same space, but I'm updating packages in a "by-subject" fashion rather than alphabetically, and I'm a bit worried if I/we will run into (even) more merge conflicts for treewide updates vs fixes for a newly enabled range. I have no actual useful review comment on the implementation though; I'll leave that to my betters. |
|
your changes will greatlly reduce amount of rebuilds and will not really conflict with mine, i'll first pickup directories with least amount of rebuilds. |
…` for some directories
fixes _64gram build
b84046c to
617ff5b
Compare
This seems blocking; no rebuilds is one of the indicators that a by-name movement was done correctly. I also really don't want to have by-name movement PRs that need to go through a staging cycle. |
|
Agree with @jopejoe1 that we shouldn't gate the by-name migration on this separate migration. I do like the various fixes to packages to modernize and enable these attributes. |
|
nixpkgs-vet seems like the right tool to use for this kind of thing. e.g. NixOS/nixpkgs-vet#172 or a rule like "once a derivation has strictDeps set, don't allow it to be unset". |
|
Yeah as @uninsane mentioned, this is something for nixpkgs-vet ratchet check |
philiptaron
left a comment
There was a problem hiding this comment.
Requesting changes for the overlay / ratchet stuff, nothing else.
|
I aggree that check for new packages should be implemented via nixpkgs-vet, but what about existing packages? I think its a nice way to do that in overlay instead of every derivation. Yeah also we can't have rebuilds during migration to by-name, good news that there < 2000 packages to be migrated to by-name left |
Great. Let's get that to a spot where we can set it down.
It's too arbitrary. Why would one package have one set of rules and the other not, just because of its name?! We need to enforce the real rule, which is that we want to make strictDep = true the default, and we do it by "ratcheting" packages forward. This isn't the way. |
|
To be clear @qweered I would merge these commits sans the overlay change. I really appreciate the work. |
Then what is? People have zero incentive to do this ratchet unless they are forced. While there is a movement to enable this manually for packages, this is an effort by a small amount of people. If the config option to make it the default ever has a chance to be enabled, there needs to be some way to encourage people beyond just smiling and saying "well that would be nice :)" I don't see how moving from not by-name to by-name is blocking, since you can just enable these attributes then move the packages. |
|
Implemented ratchets for I left out |
|
Now that the ratchet is merged, we might actually go a step further and add a feature to the auto-updater bot to try to insert these attributes for package sets where they aren't the default and not yet present in the package attr already. wdyt? |
|
@tobim We gotta get the thing updated in a new ci/pinned -- @mdaniels5757 has been trying to make that happen but he could use a hand. |
This PR introduces a mechanism to progressively enable modern Nix build defaults (
__structuredAttrs,strictDeps,enableParallelBuilding) for packages inpkgs/by-name, starting with directories that have minimal reverse dependencies.Changes
Adds configurable
enhancedDefaultRangestopkgs/top-level/by-name-overlay.nixto specify which shard ranges get enhanced defaults. Packages in these ranges automatically receive:__structuredAttrs = truestrictDeps = trueenableParallelBuilding = trueInitial range is
_0toa-. Multiple ranges supported so people are not limited to sequential migrationRemaining commits fix packages that broke with these new defaults.
Trade-off
This makes moving packages from
all-packages.nixtopkgs/by-nameharder for affected ranges, as it will trigger rebuilds due to the new defaults being applied.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.