No such file or directory
in flakes is a terrible error message #175
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#175
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce:
import ./somefile.nix
in flake.nixAt the very least, for now we should consider catching that particular error and printing a hint that it might be that, for flakes, even without checking the original directory for if the file is there.
This error can be more properly diagnosed after pennae finishes the future big evaluator IO refactor.
See also @qyriad 's PR: https://github.com/NixOS/nix/pull/9398
We have a branch somewhere that adds the filepaths involved in IO errors to the relevant exception classes and uses it in the error message.
@rbt 's structured errors PR would probably be a better foundation though
Found our branch: https://github.com/Qyriad/nix/compare/19993398a12069a868b0fb10b63f7d06f0f993e6...Qyriad:nix:cdc1a66e31c499506f6de4c7d8718ff09b105655
Is there any reason we don't want to check the original directory to see if the file was there?
Our branch does this:
cdc1a66e31/src/libexpr/flake/flake.cc (L224)
Mainly for potential lack of having the information. If we have the information, absolutely do it though.
When the original source dir is available, this could even go one step further and throw a warning when builtins.readDir is called, but not all directory entries are present in the store, for example forgetting to add a pkgs/by-name.
We have a WIP CL for this: https://gerrit.lix.systems/c/lix/+/970, but it will not be until 2.91