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

Declare targets listed in the build_data attribute of the cargo_build_script rule as prerequisites #2581

Open
jameseidson opened this issue Mar 28, 2024 · 0 comments

Comments

@jameseidson
Copy link

jameseidson commented Mar 28, 2024

Here's the relevant code:

cargo_build_script(
    name = ["my-rule"],
    srcs = ["build.rs"],
    build_data = ["//targets:my-target"],
    build_script_env = {
        "TARGET": "$(rootpath //targets:my-target)",
    },
)

When I compile, I get the following error:
<...> in cargo_build_script rule //src:my-rule: label '//targets:my-target' in $(location) expression is not a declared prerequisite of this rule

I'm on version 0.40.0

@jameseidson jameseidson changed the title Declare targets listed in the build_data of the cargo_build_script rule as prerequisites Declare targets listed in the build_data attribute of the cargo_build_script rule as prerequisites Mar 28, 2024
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

No branches or pull requests

1 participant