You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only other thing I can think of is disallowing literals from antiquotes. The only valid reason to use a literal that I can think of is to copy an in-tree path to the store. That would definitely be the "scorched earth" approach, though.
We can just disallow URLs in them -- but I'm not sure it could be done easily in Nix (I imagine they are converted to just strings in the parser). If paths are parsed differently however we can disallow strings in antiquotes entirely (I don't know a good usecase for ${"blah"}).
EDIT: to clarify, I propose to have this test before any reduction, so ${makeLibraryPath [foo]} should be fine.
It would be pretty easy to disallow uri syntax inside ${ ... } blocks. I don't see much value in them there.
On the other hand adding special cases doesn't make learning nix easier
I vote for dropping native uri parsing since it does not support the full rfc anyway: Two valid uris that are not recognized: http://[::1] and http://localhost/name;with;semicolons
Activity
abbradar commentedon Aug 8, 2016
I wonder just how many evaluation errors we'd catch when this is fixed...
edolstra commentedon Aug 8, 2016
It is in fact valid Nix syntax, since
link:0:1is parsed as a URI.abbradar commentedon Aug 8, 2016
ttuegel commentedon Aug 8, 2016
😱 😱 🙀
@abbradar Wow, your regex-fu... Much respect.
abbradar commentedon Aug 8, 2016
@ttuegel I won't be able to parse it myself in I think 15 minutes ~_^.
Seems an ugly situation without an obvious solution -- enough to tempt me to add some scream smileys to the row. Any ideas?
ttuegel commentedon Aug 8, 2016
I would say, fix all the occurrences in Nixpkgs and add a linting pass to Travis CI.
fix invalid antiquotations
abbradar commentedon Aug 8, 2016
First part done: NixOS/nixpkgs@3fca2ce (at least those that I could catch with the regexp -- it's not ideal).
ttuegel commentedon Aug 8, 2016
The only other thing I can think of is disallowing literals from antiquotes. The only valid reason to use a literal that I can think of is to copy an in-tree path to the store. That would definitely be the "scorched earth" approach, though.
abbradar commentedon Aug 8, 2016
We can just disallow URLs in them -- but I'm not sure it could be done easily in Nix (I imagine they are converted to just strings in the parser). If paths are parsed differently however we can disallow strings in antiquotes entirely (I don't know a good usecase for
${"blah"}).EDIT: to clarify, I propose to have this test before any reduction, so
${makeLibraryPath [foo]}should be fine.copumpkin commentedon Aug 8, 2016
#836 (comment)
I'm still not sure I buy the value of having special complex URI syntax over writing two extra quote characters for URLs.
copumpkin commentedon Aug 8, 2016
Also note that @vcunat knew about this issue 😄 #836 (comment)
abbradar commentedon Aug 8, 2016
IIUC @vcunat was not talking about this issue, but about absence of antiquotes in URLs (http://foo/${bar}).
I happen to agree that URI syntax is too much pain with parsing, tooling and issues like this for too little gain.
Nikolay.
vcunat commentedon Aug 9, 2016
Abbradar is correct in what I meant.
The non-URL URI literals really do seem to be confusing to most people and I don't know of any use case for them.
fkz commentedon Aug 9, 2016
It would be pretty easy to disallow uri syntax inside ${ ... } blocks. I don't see much value in them there.
On the other hand adding special cases doesn't make learning nix easier
2 remaining items
don't allow uris inside ${ ... } blocks
fkz commentedon Aug 9, 2016
done
domenkozar commentedon Oct 28, 2016
Another instance of this NixOS/nixpkgs#19939
groxxda commentedon Oct 28, 2016
I vote for dropping native uri parsing since it does not support the full rfc anyway: Two valid uris that are not recognized:
http://[::1]andhttp://localhost/name;with;semicolonsstale commentedon Feb 15, 2021
I marked this as stale due to inactivity. → More info
stale commentedon May 2, 2022
I closed this issue due to inactivity. → More info
tomberek commentedon Aug 13, 2026
Closing as stale. Re-open if needed.