-
Notifications
You must be signed in to change notification settings - Fork 70
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
disallow url literals by default #293
Conversation
What speaks against settings this globally in nix.conf? |
That would require the user to do it, and users don't have to follow nixpkgs conventions for all of their nix projects |
true but ofborg is also checking it now. Not sure if we really need it but it is a nice addition. |
url literals are probably just supported for the sake of backward compatibility, I'm not sure if there is anything else nixpkgs-review can do to change that |
nixpkgs_review/cli/__init__.py
Outdated
@@ -164,6 +164,11 @@ def common_flags() -> List[CommonFlag]: | |||
action="store_true", | |||
help="Allow import-from-derivation", | |||
), | |||
CommonFlag( | |||
"--allow-url-literals", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I see a pattern here. I don't want to so many --allow-$X
flags here. Instead a I would prefer a --allow=ifd,aliases,url-literals
flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is mostly interactive usage I think we can safely drop existing flags without causing too much damage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have than some datastructure that can store all those flags than we don't need to pass down as many parameters to other functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good idea, should I keep the --allow-aliases flag to show a deprecation message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of comma separated, I opted for it beeing passed multiple times: --allow ifd --allow aliases
since it is easier to implement with choices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just drop the flag.
bors merge |
Build succeeded: |
this is the default behavior for ofborg and hydra: NixOS/ofborg#628
also adds
--allow-url-literals