Skip to content

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

@jjmaestro

Description

@jjmaestro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions