8000 inappropriate unused_binding diagnostic with named attribute set argument (@) · Issue #73 · oxalica/nil · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

inappropriate unused_binding diagnostic with named attribute set argument (@) #73

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

Closed
edrex opened this issue Apr 13, 2023 · 3 comments
Closed

Comments

@edrex
Copy link
edrex commented Apr 13, 2023

This is a general issue, but the common use-case where I'm hitting it is in a flake when utilizing the registry to avoid specifying an explicit input URL:

screenshot-20230412-180511

inputs.nixos-hardware is not used directly in the function body, but in an expression in an included file which is passed inputs (same for home-manager and helix (src). Basically, since nil doesn't analyze into included files, it should be enough if the named attribute set argument (here, inputs) is referenced in the function body. Does that make sense?

Also, thank you so much for working on nil. It has greatly improved my daily experience of working on Nix code, and with each new analysis feature it gets better. ❤️

@edrex
Copy link
Author
edrex commented Apr 13, 2023

it should be enough if the named attribute set argument (here, inputs) is referenced in the function body

I should clarify: if the whole attrset is passed into a function, rather than another attr (inputs.bar) being referenced.

@edrex
Copy link
Author
edrex commented Apr 13, 2023

... in a flake when utilizing the registry to avoid specifying an explicit input URL

I should also explain, the reason those params are listed is to tell nix to add them as inputs from the registry.

@edrex
Copy link
Author
edrex commented Apr 13, 2023

Confirmed fixed with flake inputs. I do feel like this could still be an issue in general with named attrset arguments that get passed into a function defined elsewhere, but I don't have a specific instance in mind so I'm happy with this.

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

1 participant
0