Skip to content

Update rnix 0.12.0 to 0.14.0 with new path lints#197

Merged
philiptaron merged 2 commits intoNixOS:mainfrom
philiptaron:rnix-0.14
Feb 16, 2026
Merged

Update rnix 0.12.0 to 0.14.0 with new path lints#197
philiptaron merged 2 commits intoNixOS:mainfrom
philiptaron:rnix-0.14

Conversation

@philiptaron
Copy link
Contributor

Summary

  • Update rnix from 0.12.0 to 0.14.0 and rowan from 0.15.17 to 0.16.1
  • Leverage rnix 0.13+'s type-level path variants (PathAbs, PathRel, PathHome, PathSearch) instead of string-prefix hacks
  • Add NPV-127: absolute path expressions (e.g. /foo) are not allowed in nixpkgs
  • Add NPV-128: home-relative path expressions (e.g. ~/foo) are not allowed in nixpkgs
  • Absolute paths now get a specific error instead of falling through to the generic "cannot be resolved" (NPV-124)

Test plan

  • cargo build compiles successfully
  • cargo test — all 6 tests pass
  • tests/ref-absolute updated to expect NPV-127 instead of NPV-124
  • tests/multiple-failures updated for the new absolute path message
  • tests/ref-home-path added as new test case for NPV-128
  • tests/ref-nix-path unchanged (search path detection still works)

rnix 0.13.0 split the single `Path` AST node into four type-level
variants (PathAbs, PathRel, PathHome, PathSearch). Leverage these to
give more specific lint errors instead of relying on string-prefix
hacks for search paths and falling through to "cannot be resolved"
for absolute paths.

New problem types:
- NPV-127: absolute path expression (e.g. /foo) is not allowed
- NPV-128: home-relative path expression (e.g. ~/foo) is not allowed

Also updates rowan 0.15.17 → 0.16.1.
@philiptaron philiptaron requested a review from a team as a code owner February 16, 2026 19:19
@philiptaron
Copy link
Contributor Author

My friend Claude helped me with this.

@philiptaron philiptaron linked an issue Feb 16, 2026 that may be closed by this pull request
Copy link
Member

@mdaniels5757 mdaniels5757 left a comment

Choose a reason for hiding this comment

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

LGTM!

@philiptaron philiptaron merged commit f451cae into NixOS:main Feb 16, 2026
3 checks passed
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.

No absolute path literals

2 participants