Closed cpederkoff-carbon closed 8 months ago
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.
I'll take a look at circle and then we can merge
Since #149 was merged, if you feel that using cleanpath
is necessary, submit a PR that adds that.
Thanks!
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 likelib/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