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

Generate a warning on an implicit input specification. #4072

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kquick
Copy link
Contributor

@kquick kquick commented Sep 25, 2020

The ability to implicitly specify inputs as referencing flakes of the
same name is not specifically identified by the documentation (and
it's not clear if this behavior is intended to remain in the future).

If there is a typographical mismatch between an explicit input name
and the argument used for the output, this will result in a more
obscure error "cannot find flake 'flake:foo' in the flake registries",
which leads the user in the direction of managing the registries
instead of noticing the mis-spelling.

By adding a warning when an implicit input is created, it can make it
easier for the user to identify whether this was intended or whether
they have made an erroneous typo resulting in mismatched names.

The ability to implicitly specify inputs as referencing flakes of the
same name is not specifically identified by the documentation (and
it's not clear if this behavior is intended to remain in the future).

If there is a typographical mismatch between an explicit input name
and the argument used for the `output`, this will result in a more
obscure error "cannot find flake 'flake:foo' in the flake registries",
which leads the user in the direction of managing the registries
instead of noticing the mis-spelling.

By adding a warning when an implicit input is created, it can make it
easier for the user to identify whether this was intended or whether
they have made an erroneous typo resulting in mismatched names.
@kquick
Copy link
Contributor Author

kquick commented Sep 30, 2020

As an update, I now see where these are documented in RFC0049, but I still think that the warning is useful for the reason above.

@stale
Copy link

stale bot commented Mar 31, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Mar 31, 2021
@kquick
Copy link
Contributor Author

kquick commented Mar 31, 2021

This is ready for merge.

@stale stale bot removed the stale label Mar 31, 2021
@stale
Copy link

stale bot commented Oct 1, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Oct 1, 2021
@stale stale bot removed the stale label Mar 11, 2023
@Ericson2314 Ericson2314 added UX The way in which users interact with Nix. Higher level than UI. stale labels Mar 11, 2023
@stale stale bot removed the stale label Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flakes UX The way in which users interact with Nix. Higher level than UI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants