Skip to content
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

Improve error message when interpolating a missing path value #7303

Open
roberth opened this issue Nov 14, 2022 · 0 comments
Open

Improve error message when interpolating a missing path value #7303

roberth opened this issue Nov 14, 2022 · 0 comments
Labels
error-messages Confusing messages and better diagnostics feature Feature request or proposal stale UX The way in which users interact with Nix. Higher level than UI.

Comments

@roberth
Copy link
Member

roberth commented Nov 14, 2022

Is your feature request related to a problem? Please describe.

Users may not be aware of the meaning of interpolating a path value (adding it to the store).
Alternatively, the may not realize that their subexpression evaluates to a path value, making the following error surprising:

nix-repl> "${/var/lib/someService}"
error: getting status of '/var/lib/someService': No such file or directory

Nix could provide more context in this situation.

  • while adding a path to the store
  • while interpolating a path value into a string, at location xyz

Describe the solution you'd like

nix-repl> "${/var/lib/someService}"
error: getting status of '/var/lib/someService': No such file or directory
          while adding a path to the store
          while interpolating a path value into a string, at <command line>:1:3

or similar

Describe alternatives you've considered

Additional context

@roberth roberth added feature Feature request or proposal UX The way in which users interact with Nix. Higher level than UI. error-messages Confusing messages and better diagnostics labels Nov 14, 2022
@stale stale bot added the stale label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-messages Confusing messages and better diagnostics feature Feature request or proposal stale UX The way in which users interact with Nix. Higher level than UI.
Projects
None yet
Development

No branches or pull requests

1 participant