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

Renamed _build_script_run rule to cargo_build_script #1612

Merged
merged 2 commits into from
Oct 28, 2022

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented Oct 28, 2022

Today the primary target of a cargo_build_script entry in a BUILD file is actually a _build_script_run rule. This makes targets hard to query for folks who are not intimately aware of how this functionality is implemented. To reduce confusion for users, the rule seen in their BUILD files should be something they can query for. For example:

rules_rust % bazel query 'kind(cargo_build_script, //...)'
//test/build_env:cargo_build_script_env-vars_build_script
//test/cargo_build_script:tools_exec_build_rs
//test/dep_env:read_a
//test/dep_env:read_b
//test/dep_env:read_dep_dir
//test/dep_env:set_a_build
//test/out_dir_in_tests:build_script
//test/transitive_lib:buildscript
//test/unit/transitive_link_search_paths:dep_build_script
//test/unit/transitive_link_search_paths:proc_macro_build_script
Loading: 7 packages loaded

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Makes sense to me - thanks!

@UebelAndre UebelAndre merged commit 295b5cc into bazelbuild:main Oct 28, 2022
@UebelAndre UebelAndre deleted the build_script_wrapper branch October 28, 2022 14:37
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.

None yet

2 participants