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

warn about unknown flake url paramaters #10370

Closed
lolbinarycat opened this issue Mar 30, 2024 · 2 comments · Fixed by #11349
Closed

warn about unknown flake url paramaters #10370

lolbinarycat opened this issue Mar 30, 2024 · 2 comments · Fixed by #11349
Labels
feature Feature request or proposal fetching Networking with the outside (non-Nix) world, input locking good first issue Quick win for first-time contributors idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome.

Comments

@lolbinarycat
Copy link

Is your feature request related to a problem? Please describe.
recently i made a typo and accidentally tried to install a package from github:nixos/nixpkgs?revnixpkgs-unstable (notice the lack of =), and nix just built the whole thing successfully (i assume using the master branch instead)

Describe the solution you'd like
a warning should be displayed if there are unknown keys in a url-style flake reference (eg. "warning: unknown flake attribute XXX, check your spelling or update nix")

at least for github: or flake: urls, i assume for git+http url unrecognized paramaters are just passed to the http server.

Priorities

Add 👍 to issues you find important.

@lolbinarycat lolbinarycat added the feature Feature request or proposal label Mar 30, 2024
@roberth roberth added the fetching Networking with the outside (non-Nix) world, input locking label Apr 2, 2024
@edolstra edolstra added idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. good first issue Quick win for first-time contributors labels Jun 19, 2024
@bryanhonof
Copy link
Member

Are there currently store types that allow for a query part without it being a key value pair?
I don't recall ever encountering one where the equal sing was missing, and if it was used as some sort of flag, it's more often than not key=val.

If the above is the case, maybe we should throw an error if someone tries to use a store URL that includes the key part in the query, but doesn't assign a value.

@bryanhonof
Copy link
Member

It looks like the type is even a map of string to string.

std::map<std::string, std::string> decodeQuery(const std::string & query)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal fetching Networking with the outside (non-Nix) world, input locking good first issue Quick win for first-time contributors idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants