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
Nix has pretty surprising escaping behavior. There are some valid escape sequences (like \\, \n, \r, ...), but if an escape sequence doesn't exist, it just swallows the backslash silently in double quoted strings. This can lead to bugs which are hard to spot especially when using builtins.match which involves a lot of escaping usually.
It should be possible to add a warning to nixpkgs-hammering (maybe using tree-sitter to access the AST).
Nix has pretty surprising escaping behavior. There are some valid escape sequences (like
\\
,\n
,\r
, ...), but if an escape sequence doesn't exist, it just swallows the backslash silently in double quoted strings. This can lead to bugs which are hard to spot especially when usingbuiltins.match
which involves a lot of escaping usually.It should be possible to add a warning to nixpkgs-hammering (maybe using tree-sitter to access the AST).
That problems exist currently is evidenced by NixOS/nixpkgs#114853.
(Also escaping issues in indented strings may exist, but I'm not sure on top of my head.)
The text was updated successfully, but these errors were encountered: