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

"does not have mandatory providers: 'TemplateVariableInfo'" error #195

Open
jjmaestro opened this issue Sep 30, 2024 · 1 comment
Open

Comments

@jjmaestro
Copy link

jjmaestro commented Sep 30, 2024

I was playing with this toolchain and I was trying to use the toolchain as part of genrule toolchains:

genrule(
    name = "test",
    outs = ["out.txt"],
    cmd = "echo foo > $@",
    toolchains = [
        "@zig_sdk//toolchain:linux_amd64_gnu.2.38",
    ],
)

When I try to build the target, I get:

ERROR: /src/workspace/BUILD:1:8: in toolchains attribute of genrule rule //:test: \
  '@@hermetic_cc_toolchain~~toolchains~zig_sdk//toolchain:linux_amd64_gnu.2.38' \
  does not have mandatory providers: 'TemplateVariableInfo'

I was expecting the toolchain to also declare TemplateVariableInfo so that the tools in the toolchain could be used via Makefile variables as well, like e.g. rules_bison does.

@jjmaestro
Copy link
Author

Also, is there a convenient way to select whatever the current toolchain is, similar to @rules_bison//bison:current_bison_toolchain?

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