Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for include_prefix and / or strip_include_prefix for rb_library rules #219

Open
JasonLunn opened this issue Mar 6, 2025 · 1 comment

Comments

@JasonLunn
Copy link

cc_libraries have a concept of being able to manipulate the prefix of the libraries, e.g.:

https://bazel.build/reference/be/c-cpp#cc_library.include_prefix
https://bazel.build/reference/be/c-cpp#cc_library.strip_include_prefix

It would be great if rb_library supported similar capabilities.

Without it, we find that Bazel Ruby scripts have to do awkward load path manipulation that we don't think non-Bazel ruby users would normally have to worry about.

Context: protocolbuffers/protobuf#19808 (comment)

JasonLunn added a commit to protocolbuffers/protobuf that referenced this issue Mar 6, 2025
@p0deje
Copy link
Member

p0deje commented Mar 6, 2025

I'll look into this in more detail, but at a quick glance you can use RUBYLIB env in rb_bundle_fetch(env) or rb_library(bundle_env), which would provide an extra load paths.

@p0deje p0deje changed the title Feature request: Add support for include_prefix and / or strip_include_prefix for rb_library rules Add support for include_prefix and / or strip_include_prefix for rb_library rules Mar 8, 2025
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

No branches or pull requests

2 participants