Skip to content

Handle absolute extension paths #142

Closed
cpederkoff-carbon wants to merge 6 commits intobazelruby:masterfrom
cpederkoff-carbon:absolute_paths
Closed

Handle absolute extension paths #142
cpederkoff-carbon wants to merge 6 commits intobazelruby:masterfrom
cpederkoff-carbon:absolute_paths

Conversation

@cpederkoff-carbon
Copy link
Copy Markdown

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.0
Previously 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.0 which 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

@cpederkoff-carbon
Copy link
Copy Markdown
Author

Ping @yugui @kigster it looks like CircleCI is failing on the master branch https://app.circleci.com/pipelines/github/bazelruby/rules_ruby
Not sure how to proceed.

@kigster
Copy link
Copy Markdown
Contributor

kigster commented Mar 19, 2023

I'll take a look at circle and then we can merge

@kigster
Copy link
Copy Markdown
Contributor

kigster commented Dec 19, 2023

Since #149 was merged, if you feel that using cleanpath is necessary, submit a PR that adds that.

Thanks!

Copy link
Copy Markdown
Contributor

@kigster kigster left a comment

Choose a reason for hiding this comment

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

A similar PR #149 was merged.

@cpederkoff-carbon cpederkoff-carbon deleted the absolute_paths branch December 20, 2023 20:43
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.

2 participants