-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Be smart and helpful when some files are missing during the evaluation #4507
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
When evaluating a local git flake, if a file a missing at eval-time but present in the source directory, tell the user that he probably forgot to check it out Fix #4507
When evaluating a local git flake, if a file a missing at eval-time but present in the source directory, tell the user that he probably forgot to check it out Fix #4507
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/tweag-nix-dev-update-15/13975/1 |
When evaluating a local git flake, if a file a missing at eval-time but present in the source directory, tell the user that he probably forgot to check it out Fix #4507
This will be fixed as part of #3121. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/tweag-nix-dev-update-24/17230/1 |
A change that is (already) confusing some Nix developers (including me) is that in the case of project repository being tracked under git only files tracked by git are visible by
nix build
. It happens that a user will forget to add a file to git andnix build
will complain that it can not find a file duringnix build
.In contrast "old"
nix-build
will usually copy everything under the project folder (well depends what yoursrc = ...
looks like).Now there is a good reason that this behavior changed. With this a user will catch a problem earlier locally instead of pushing to upstream and only then realizing that CI failed due to a missing file.
But we need to help the user understand what is happening and that this is a feature that is saving him time and not just
I propose to do the following:
In case of missing nix files we can already suggest what the problem can be. This error happens during the evaluation. The edge case we must make sure it works is a missing
flake.nix
(this is possible if you first create a nix project and only then git repository). With this error we can point directly to which file is missingIn case of non-nix missing files we can not directly point which file(s) is missing and causing
nix build
to fail. What we can show is that there is a number of untracked files in Git and that Nix when used with git will only see files tracked by git. Please rungit status
and add missing files./cc @edolstra
The text was updated successfully, but these errors were encountered: