Be more helpful when a flake eval is missing some files #4993
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When building 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
The current approach is far from complete as is only works for
nix build
, but having a more generic thing is actually quite complex or hacky, and I’d like to have some feedback on my plan before implementing it.My idea is to
void enhanceMessage(void(void))
method toInstallable
that’s semantically just calling its argument, but can also add some informations to the error message if one is thrown.(In practice, this will be a no-op, except for
InstallableFlake
when the flake input is a local git repo − or probably mercurial too)run()
inInstallableCommand
to runinstallable.enhanceMessage(run(store))
I think this would work, but it isn’t utterly pretty, so if you have any concern or better idea, feel free to chime in.
Depends on #3121
We depends on above ticket because a ticket provides needed information without guessing it.