Handle absolute extension paths #142
Closed
cpederkoff-carbon wants to merge 6 commits intobazelruby:masterfrom
Closed
Handle absolute extension paths #142cpederkoff-carbon wants to merge 6 commits intobazelruby:masterfrom
cpederkoff-carbon wants to merge 6 commits intobazelruby:masterfrom
Conversation
Author
|
Ping @yugui @kigster it looks like CircleCI is failing on the master branch https://app.circleci.com/pipelines/github/bazelruby/rules_ruby |
Contributor
|
I'll take a look at circle and then we can merge |
kigster
approved these changes
Dec 19, 2023
Contributor
|
Since #149 was merged, if you feel that using Thanks! |
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.
Require_paths is not always a relative_path.
When it is a path to a gem extension it is given to us as an absolute path like:
/<bazel_cache_dir>/external/bundle/lib/ruby/2.7.0/extensions/x86_64-linux/2.7.0/pg-1.0.0Previously this would be appended to gem_path and look like
lib/ruby/2.7.0/gems/pg-1.0.0/<bazel_cache_dir>/external/bundle/lib/ruby/2.7.0/extensions/x86_64-linux/2.7.0/pg-1.0.0which does not resolve to a real file.This new code converts that absolute path to a relative path from the expected directory and the output looks like:
lib/ruby/2.7.0/extensions/x86_64-linux/2.7.0/pg-1.0.0