You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relying on an exec configuration through targets consumed in target leads to the potential for cfg = "exec" to be evaluated differently in the transitive target (in this case, cargo_build_script_runfiles.script) and the consumer (cargo_build_script.data_runfiles). This change moves the script directly back to cargo_build_script in cfg = "exec" and separately uses a cfg = "target" intermediate rule to implement runfiles (solving for bazelbuild/bazel#15486).
We've found a regression while testing this change internally. To reproduce, patch repro.patch into a clean working copy and run bazel build //test/unit/cargo_build_script_data_runfiles:reproduce_bin.
If I understand correctly, the main problem is that the runfiles library needs the RUNFILES_DIR env variable to point to the runfiles directory created by cargo_build_script. Apart from that, I believe we also need to copy the _repo_mapping file from the original runfiles dir to the new one. As far as I can tell, doing both of these things makes the example build correctly, but I don't know the right way to get the data to the right place. Could you please take a look?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relying on an exec configuration through targets consumed in
targetleads to the potential forcfg = "exec"to be evaluated differently in the transitive target (in this case,cargo_build_script_runfiles.script) and the consumer (cargo_build_script.data_runfiles). This change moves the script directly back tocargo_build_scriptincfg = "exec"and separately uses acfg = "target"intermediate rule to implement runfiles (solving for bazelbuild/bazel#15486).closes #3201 #3893