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

Propagate cargo_build_script.data to Rustc compile actions #2856

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

UebelAndre
Copy link
Collaborator

This way any outputs that the build script may refer to in flags it emits can be referenced without needing to also explicitly pass the data target to the compile_data attribute of it's consumer.

@UebelAndre UebelAndre added this pull request to the merge queue Sep 11, 2024
Merged via the queue into bazelbuild:main with commit 5063cd8 Sep 11, 2024
4 checks passed
@goffrie
Copy link
Contributor

goffrie commented Nov 26, 2024

Is there any way to opt out of this? We have some rules where we want data to only be provided to the build script (admittedly the situation is a pile of hacks, and this is just what broke the camel's back).

@UebelAndre
Copy link
Collaborator Author

Is there any way to opt out of this? We have some rules where we want data to only be provided to the build script (admittedly the situation is a pile of hacks, and this is just what broke the camel's back).

If the data is only for the build script would assigning it to tools do the trick for you? That shouldn't be propagated beyond the build script

tools (list, optional): Tools (executables) needed by the build script.

I'm otherwise not opposed to an incompatibility flag, but when making this change I thought that would cover such a use case.

@illicitonion
Copy link
Collaborator

I'm not sure an incompatibility flag would make sense for this one long-term, but an extra attr on cargo_build_script for non_propagated_data or something may?

@goffrie
Copy link
Contributor

goffrie commented Nov 27, 2024

tools is built for the exec configuration unfortunately, which does matter for my use case. I agree that adding an incompatibility flag doesn't make much sense, but adding yet another attr seems unfortunate too :/

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.

3 participants