Skip to content

eval/nixpkgs,outpaths: fix alias checking#645

Merged
cole-h merged 2 commits intoNixOS:releasedfrom
lilyinstarlight:fix/alias-checking-v2
Jun 16, 2023
Merged

eval/nixpkgs,outpaths: fix alias checking#645
cole-h merged 2 commits intoNixOS:releasedfrom
lilyinstarlight:fix/alias-checking-v2

Conversation

@lilyinstarlight
Copy link
Member

@lilyinstarlight lilyinstarlight commented Jun 14, 2023

This basically does an approach like #594 but also adds an eval step to check whether the package set still shallow evals with aliases enabled

This does seem to catch at least typos in aliases.nix and should hopefully catch whatever else we care about in there. This does not increase ofborg eval time since it effectively changes default outpath calculation and replaces packages-list-no-aliases by packages-list-with-aliases

Alternative to #643
Closes #575
Supersedes #572 #539

@vcunat
Copy link
Member

vcunat commented Jun 15, 2023

Why do we even keep the package-list-with-aliases task? I assumed we'd just drop it.

@lilyinstarlight
Copy link
Member Author

Why do we even keep the package-list-with-aliases task? I assumed we'd just drop it.

I believe the whole reason #594 was closed rather than merged to begin with is because then aliases.nix would not longer be checked for errors (see #594 (comment))

Should we just merge it with the check right above it to only check that the package list with aliases.nix evaluates fine? Or is there value is checking the JSON package list both with and without aliases?

@vcunat
Copy link
Member

vcunat commented Jun 15, 2023

Ah, I see. Checking that does make sense.

@cole-h
Copy link
Member

cole-h commented Jun 15, 2023

Why do we even keep the package-list-with-aliases task? I assumed we'd just drop it.

I believe the whole reason #594 was closed rather than merged to begin with is because then aliases.nix would not longer be checked for errors (see #594 (comment))

Should we just merge it with the check right above it to only check that the package list with aliases.nix evaluates fine? Or is there value is checking the JSON package list both with and without aliases?

Let's keep it as-is for now.

I like this much better than #643 (provided it works... 🤞). I'll make some time to get this deployed tomorrow.

Thanks for the PR!

@lilyinstarlight
Copy link
Member Author

I like this much better than #643 (provided it works... 🤞).

I did attempt to test it locally and while I could confirm that the with-aliases check works, I apparently don't have enough memory (32G ram + 16G swap!) to fully eval outpaths.nix

But I did manage to get it to eval far enough to fail one of the problematic alias PRs that ofborg missed, so it does look like it should be good. Thank you!

I'll close the other PR and mark this one ready-for-review since I've done a little testing now and this one seems to be more acceptable

@lilyinstarlight lilyinstarlight marked this pull request as ready for review June 15, 2023 14:51
@vcunat
Copy link
Member

vcunat commented Jun 15, 2023

Yes, these things can eat a lot, as I warned. See e.g. NixOS/nixpkgs#227945

@cole-h
Copy link
Member

cole-h commented Jun 16, 2023

Alright, testing this out dirtily, and if it holds well for the next ~hour, I'll merge this and make it stick. Thanks!

@cole-h
Copy link
Member

cole-h commented Jun 16, 2023

Seems to work great. Thanks!

@cole-h cole-h merged commit cda5aa2 into NixOS:released Jun 16, 2023
@lilyinstarlight lilyinstarlight deleted the fix/alias-checking-v2 branch June 16, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Always evaluate with config.allowAliases = false to avoid deprecation warning errors

3 participants