Add opt-in path alias normalization - #26
Merged
Merged
Conversation
Coverage Report for CI Build 29666870940Coverage decreased (-5.4%) to 94.643%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR adds opt-in path alias normalization for locally-resolved sibling gem paths so Bundler receives a canonicalized path spelling (reducing Gemfile.lock churn when equivalent paths like /var/home/... vs /home/... exist).
Changes:
- Extend
Nomono::Resolver#gemswith optionalpath_aliases/*_PATH_ALIASES/NOMONO_PATH_ALIASESsupport and normalize resolved gem paths accordingly. - Add specs covering alias normalization, precedence (most-specific match), and validation/error behavior.
- Document the new configuration in the README and record it in the changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/nomono/resolver_spec.rb | Adds test coverage for alias parsing, normalization, precedence, and failure modes. |
| spec/nomono/gemfile_dsl_spec.rb | Verifies normalized paths flow through eval_nomono_gems into gem(path:) calls. |
| README.md | Documents *_PATH_ALIASES / NOMONO_PATH_ALIASES and shows usage examples. |
| lib/nomono/resolver.rb | Implements alias parsing/validation and applies canonicalization to resolved gem paths. |
| CHANGELOG.md | Notes the addition of opt-in alias normalization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pboling
force-pushed
the
fix/path-alias-normalization
branch
from
July 19, 2026 00:23
2157f9a to
326134f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
path_aliases:config plus*_PATH_ALIASES/NOMONO_PATH_ALIASESenv configuration.File.realpathand fail closed when configured aliases are malformed or do not resolve to the same directory.Why
Bundler serializes the
gem ..., path:value it receives intoGemfile.lockpath remotes. Equivalent aliases such as/var/home/...and/home/...therefore churn lockfiles unless the path spelling is normalized before Bundler sees it.Example
Or via env:
Verification
K_SOUP_COV_DO=false bundle exec kettle-test spec/nomono/resolver_spec.rb spec/nomono/gemfile_dsl_spec.rbbin/rake rubocop_gradual:autocorrectK_SOUP_COV_DO=false bundle exec kettle-testgit diff --check