-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
Use nix file set API to reduce how often we will need to rebuild #6113
Conversation
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
Thanks for working on this @JRMurr :) |
Ahh my bad, will remove those. Good to review otherwise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @JRMurr!
Revert "Merge pull request #6113 from JRMurr/nix-build-file-sets"
I've reverted this PR @JRMurr, it sneaked through our CI, not yet sure how. It was hitting this issue, I'm not yet sure what exactly caused it. |
@Anton-4 ahh my bad thats a strange error, "in theory" my changes should only affect the nix build but not the dev env. Ill see if i can find a repro |
Ahh it was probably the flake update actually |
Not your fault, CI should have caught it |
That would be my guess as well |
some context https://roc.zulipchat.com/#narrow/stream/316715-contributing/topic/refactor.20nix.20files.2Fdefault.20build/near/404518156
What this is
This uses the new file set API (links at the bottom) for nix to reduce how many files we pass as the source to the nix builder for roc.
The bulk of the logic is is
nix/fileFilter.nix
, I added comments above each filter to call out what it does but please let me know if I should explain more.TLDR of whats filtered
tests
- we don't currently run tests in the nix build so they were not neededcrates
folder + a few files in the repo root like Cargo.{toml, lock}.md
,.svg
, and.png
We can probably do more aggressive filtering especially if we refactor where we put the test only crates but I think this is a decent balance for now so if new crates/files are added people don't get weird errors they would not expect.
Misc changes
I had to update nixpkgs in the flake to get the new apis. I didnt notice any issues locally but might need someone to sanity check me
some links