bazelruby / rules_ruby

Formerly canonical rules for ruby, that are about 2-3 years behind current Bazel. If they work for you great, but if not — please try the new rules ruby by Alex Radionov: https://github.com/bazel-contrib/rules_ruby
Apache License 2.0
99 stars 37 forks source link

Handle absolute paths in required_paths #149

Closed JasonLunn closed 8 months ago

JasonLunn commented 1 year ago

Gems with native extensions (like ffi) will sometimes have elements of require_paths that are absolute rather than gem-path relative paths. It is incorrect to prepend those paths with the gem_path and Bazel will only allow relative paths as inputs to its glob() function, so they must be transformed to relative paths before being emitted.

JasonLunn commented 1 year ago

@yugui @kigster - the CircleCI failures all look like they're permissions-related... is there something I can do to fix that in my branch, or is that something that needs to be addressed on the infrastructure side?

kigster commented 9 months ago

@JasonLunn is this PR identical to #142?

If so I might prefer it due to using of cleanpath.

JasonLunn commented 9 months ago

They're definitely similar. I tried to minimize the touching the existing support for relative paths. My own habits would be to introduce the use of cleanpath separately, since that really doesn't have anything to do with handling absolute paths. As long as some fix gets merged, I don't feel strongly either way.