-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
treewide: Unquote most URLs #46378
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
treewide: Unquote most URLs #46378
Conversation
People intend to move in the opposite direction, see #27809 (comment) |
Oh no |
I mean I could just reverse the regexp… |
I wouldn't hurry with such mass replacements. I personally can't see why it should make a significant difference if you use one way or another one. |
@vcunat The main reason in my opinion is consistency. Having all packages follow the same pattern is a lot less confusing for new users. Of course there is an almost infinite amount of ways you can package software, but IMO we should have some common ground for some parts. Maybe this PR isn't the proper location to discuss this and this is probably not the best time as well, as a new release is pretty close and there is more important stuff to do. |
Perhaps, but first we need a clear consensus that one of the two variants is preferred ;-) |
Yes, I agree with you. What do you think is the proper place for such a discussion? Discourse? IRC? Private Mails? This PR? A RFC? |
This thread isn't a bad start, IMHO. RFC is another option. We could link to that thread from other places if it seems there are too little eyes. Consistency: note that we have URLs inside |
Yes, I also found that the url type fails for the characters I mentioned above: I haven't found other places where I can link this thread yet, but I'll keep looking :) |
I vote for doing the reverse. Let me reiterate the arguments against unquoted URIs I liked in the previous discussions:
- simpler nix language EBNF,
- `magnet:abc` should this be a function or a URI?
- Nix can't properly encode all URIs without quotes anyway, as noted above.
|
And we do need quoted URLs for |
While I'm favor of not quoting URLs, this PR causes a lot of code churn for a minor syntactic cleanup, which I think is to be avoided. (BTW, I don't agree with the sentiment that "People [who?] intend to move in the opposite direction".) |
Closing this as most seem to be against this change (me included). Maybe eventually this could be enforced with some ofborg check to disallow unquoted URLs. |
Motivation for this change
Quoted URLs are strings instead of URLs. When using another package as example when writing one of my first packages, it got rejected because URLs shouldn't be quoted.
This PR removes quotes from URLs so nobody uses them as example as I did back then.
I excluded all URLs which contain one of these characters:
$#";(
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)