Skip to content

ci: lix parse; treewide: fix incorrect string escapes#4253

Merged
khaneliman merged 3 commits intonix-community:mainfrom
khaneliman:lix-parse
Apr 22, 2026
Merged

ci: lix parse; treewide: fix incorrect string escapes#4253
khaneliman merged 3 commits intonix-community:mainfrom
khaneliman:lix-parse

Conversation

@khaneliman
Copy link
Copy Markdown
Contributor

Done with help of lix parsing for warnings.

Closes #4251

Related nix-community/home-manager#9150 NixOS/nixpkgs#511836

Done with help of lix parsing for warnings.
Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple nits w.r.t. nix/shell variable hygiene. Otherwise sgtm.

Thanks for putting this together!

Comment thread ci/parse.nix Outdated
Comment thread ci/parse.nix Outdated
Comment thread ci/parse.nix Outdated
Comment thread ci/parse.nix Outdated
Comment thread ci/parse.nix Outdated
Comment thread flake/dev/parse.nix
Comment thread tests/test-sources/plugins/by-name/dropbar/default.nix Outdated
};
fileEncoding = "utf8";
meta = "$\{version} $\{language} $\{encoding}";
meta = "\${version} \${language} \${encoding}";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why we had so many $\{foo}s?

Copy link
Copy Markdown
Contributor Author

@khaneliman khaneliman Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harder to spot just trying to get lsp / eval happy

Comment thread ci/parse.nix Outdated
Comment thread .github/workflows/lint.yml
shell: bash

jobs:
treefmt:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This job should probably be renamed now.

Maybe lint is ok, but that'll show up in the UI as lint / lint (pull_request).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me think... Would nix-instantiate --parse make sense as a treefmt step? We'd need to wrap it in a treefmt-compliant tool of course, and have lix+nix permutations still. Maybe an idea for another day.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
Co-authored-by: piegames <git@piegames.de>
Replace the copied wrapper form with the final Vim regex string and
update the test fixture to match. This preserves upstream regex behavior
while still avoiding the broken Nix string escape warning.
@khaneliman khaneliman requested a review from MattSturgeon April 22, 2026 00:30
Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thanks

@khaneliman khaneliman added this pull request to the merge queue Apr 22, 2026
Merged via the queue into nix-community:main with commit 8846a4f Apr 22, 2026
4 checks passed
@khaneliman khaneliman deleted the lix-parse branch April 22, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[STYLE] lix 2.95 warns on many broken-string-escapes

2 participants