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

less.nix: fix escape #117066

Merged
merged 1 commit into from Mar 24, 2021
Merged

less.nix: fix escape #117066

merged 1 commit into from Mar 24, 2021

Conversation

kvtb
Copy link
Contributor

@kvtb kvtb commented Mar 20, 2021

$$ does not escape $
\$ does

$$ does not escape $
\$ does
@kvtb
Copy link
Contributor Author

kvtb commented Mar 20, 2021

That raises the question: when are those examples from mkOption evaluated?
I expected they are used to produce the documentation, but this bug proves that they are never evaluated (the evaluation fails because there is in fact no my-configs in pkgs)
Should they be removed?
Just for code brevity.
There are 10000s lines of them

@sternenseemann
Copy link
Member

These are evaluated when building the nixos manual like this for example: nix-build nixos/release.nix -A manual.

The current situation constitutes no eval error at least "$${foo}" evaluate to $${foo} interestingly enough, but the strings are wrong and should be fixed.

@sternenseemann
Copy link
Member

sternenseemann commented Mar 24, 2021

For reference, here you can observe the issue in the wild.

@sternenseemann sternenseemann merged commit 5e64731 into NixOS:master Mar 24, 2021
@kvtb
Copy link
Contributor Author

kvtb commented Mar 25, 2021

wow. then there is a bug in syntax highlighting of my editor

@sternenseemann
Copy link
Member

Nix escaping rules are pretty quirky, so I'd expect most syntax highlighters are not 100% accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants