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

become compatible with incompatible_disable_starlark_host_transitions #118

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

Olsworn
Copy link
Contributor

@Olsworn Olsworn commented Feb 10, 2023

--incompatible_disable_starlark_host_transitions will become default with bazel 7.0
This makes cfg = "host" syntax illegal

Thread: bazelbuild/bazel#17032

@@ -145,7 +145,7 @@ _snapshots_runner = rule(
attrs = {
"snapshots": attr.label(
default = "@snapshots-bin//:snapshots",
cfg = "host",
cfg = "target",
Copy link
Collaborator

Choose a reason for hiding this comment

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

WHy is this one target while the other one is exec? Aren't both refering to the same binary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are the same binary, however the way both binaries are used is different.
I could be wrong about this but:
In the case of _snapshots_runner, we are not running the executable during build phase, but at runtime.
Because we want the binary that snapshots_runner produces to use a binary that the machine runs the script will use.

Some documentation on the subject: https://bazel.build/extending/rules#configurations

@Olsworn Olsworn merged commit 0e3c813 into main Feb 13, 2023
@Olsworn Olsworn deleted the incompatible_disable_starlark_host_transitions branch February 13, 2023 07:39
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.

2 participants