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

[FR]: Add support for runtime_toolchain_type for jq/yq/... #747

Open
BoleynSu opened this issue Feb 6, 2024 · 4 comments
Open

[FR]: Add support for runtime_toolchain_type for jq/yq/... #747

BoleynSu opened this issue Feb 6, 2024 · 4 comments
Labels
enhancement New feature or request more info needed More info needed to proceed further

Comments

@BoleynSu
Copy link

BoleynSu commented Feb 6, 2024

What is the current behavior?

No response

Describe the feature

The current toolchain only provides the binary for use during the build but no binary for the build output. People already misuse the cfg=exec binary in a cfg=target output, e.g. https://github.com/bazel-contrib/rules_oci/blob/main/oci/private/push.sh.tpl. Providing another runtime_toolchain_type (similar to what rules_java does) can help improve the current situation. Alternatively, we can provide both exec and target binary in the current toolchain and ask users to use the correct binary.

@alexeagle
Copy link
Member

We didn't intend to provide jq or yq for the target platform, and from this issue I don't understand why that would be useful. the rules_oci push.sh you point to is meant to be run on the host machine with bazel run so it shouldn't need cfg=target tools.

@alexeagle alexeagle added more info needed More info needed to proceed further and removed untriaged Requires traige labels Mar 26, 2024
@BoleynSu
Copy link
Author

jq/yq is used at runtime (target) while the binary is for build time (exec). For example, you can think bout how java works if you compile on Linux for Linux with Windows executors. When we run the build results, it should not use java.exe.

@anguslees
Copy link

from this issue I don't understand why that would be useful

Eg: using jq/yq in executable rules (ie: bazel tests or bazel run scripts)

@BoleynSu
Copy link
Author

BoleynSu commented Jul 1, 2024

#875 partially implements this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request more info needed More info needed to proceed further
Projects
Status: No status
Development

No branches or pull requests

3 participants