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
some recurseIntoAttrs
hackery
#45841
Conversation
This can be also approached as a wrapper without touching nixpkgs, though perhaps with a little worse performance – a function that imports nixpkgs and recursively adds the attribute everywhere (all is lazy, of course). Something similar is done in |
Also |
This provides a controlled way to recurse into package subsets with `config.recurseIntoAttrs`.
97ab6cb
to
0dac30c
Compare
@vcunat @edolstra regardless of the The problem with #38635 (comment) is that hydra metrics graphs like memory consumption and etc don't make too much sense without knowing the number of packages it tried to evaluate. |
should this be rebased or closed now? |
Most of this was merged via other PRs but the main thing was not and I kinda hope to hear some input on option names, semantics and such.
|
My opinion on naming:
Also, a minor nitpick, I can suggest the following refactor to propagate package set name automatically:
|
- `recurseIntoAttrs` should be called `hydraPackageSet :: Attrset -> Attrset`
- `dontRecurseIntoAttrs` should be called `packageSet :: String -> Attrset -> Attrset`
- `recurseIntoAttrsMaybe` should be called `packageSet`.
I would rather have a single `packageSet` configurable via a `config` option instead of having `hydraPackageSet`. I think having an option to disable stuff hydra builds by default is useful.
Can you provide an insight on why some are "dont", and others are "maybe"?
Non-default sets are "dont", default ones are "maybe".
Is "all" your personal choice of "interesting" attrsets?
Yes, the "dont/maybe" part was made so that "all" would be "all default sets". But now thinking about it, it does make sense to have two "all"s...
Also, a minor nitpick, I can suggest the following refactor to propagate package set name automatically:
That's cute, will do.
|
Thank you for your contributions.
|
I marked this as stale due to inactivity. → More info |
What?
Apply this, put
{ recurseIntoAttrs = [ "all" ]; }
into yourconfig.nix
, donix-env -qa
/nix search
, see all the packages (or, alternatively, consume all the memory and crash).Motivation for this change
nix-env -qa
to list all the packages for measurements and to toggle that feature on and off for package subsets.I started making it specifically for #38635 (comment), but, I think, it turned out to be generally useful by itself.
I made
dontRecurseIntoAttrs
as a joke to guide myself via search, but now kinda like it too.Things done