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

Rename pathes fetched and copied as flake inputs (and if it is just for error reporting/stacktraces) #6351

Open
NobbZ opened this issue Apr 2, 2022 · 2 comments

Comments

@NobbZ
Copy link
Contributor

NobbZ commented Apr 2, 2022

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

When reading any logs or errors created by a flake evaluation, I see errors that include cryptical store pathes which all are named source. It takes some effort and experience to be able to say, if this error is currently pointing to a file from self, nixpkgs or home-manager input, even worse if one uses different versions of nixpkgs in the same flake.

Describe the solution you'd like

Instead of all naming all created store pathes source, use the inputs attribute name by default and add an attribute name to override it by the user.

Additional context

I have not yet thought about a good solution for inputs of inputs.

@tejing1
Copy link

tejing1 commented Apr 2, 2022

Perhaps an alternative would be to have the nix error reporting code back-convert the store paths into the corresponding input of the flake in question. Not sure how you'd pick one in cases where there were multiple inputs referring to the same storepath, though (such as when using follows).

@NobbZ
Copy link
Contributor Author

NobbZ commented Apr 25, 2022

TIL: there is a related RFC: NixOS/rfcs#123

@NobbZ NobbZ changed the title Rename pathes fetched and copied as flake inputs Rename pathes fetched and copied as flake inputs (and if it is just for error reporting/stacktraces) Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants