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

Fix wrong toolchains label in Custom Plugins document #318

Closed
wants to merge 1 commit into from

Conversation

Ginakira
Copy link

Version: v4.6.0
In custom plugin, if I defined toolchain attribute as @rules_proto_grpc//protoc:toolchain_type in proto compile rule just same as document:

# Create compile rule
example_compile = rule(
    implementation = proto_compile_impl,
    attrs = dict(
       ...
    ),
    toolchains = [str(Label("@rules_proto_grpc//protoc:toolchain_type"))],
)

It has error when build:

(11:16:43) ERROR: /.../BUILD:29:20: While resolving toolchains for target //foo_protoc:foo_proto: com.google.devtools.build.lib.packages.BuildFileNotFoundException: no such package '@rules_proto_grpc//protoc': BUILD file not found in directory 'protoc' of external repository @rules_proto_grpc. Add a BUILD file to a directory to mark it as a package.

Replace it to @rules_proto_grpc//protobuf:toolchain_type will resolve this problem. And I found there is no folder named protoc under the <bazel_cache_dir>/external/rules_proto_grpc.

Maybe code of the document is outdated. Please review this pull request, thanks!

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jun 13, 2024
@aaliddell
Copy link
Member

Thanks, but you are looking at the docs for the v5 release but using the v4 release. The docs for the version you are using are at https://rules-proto-grpc.com/en/4.5.0/custom_plugins.html (4.6.0 is not being shown by RTD for some reason)

@aaliddell aaliddell closed this Jul 8, 2024
@Ginakira
Copy link
Author

Ginakira commented Jul 9, 2024

Thanks, but you are looking at the docs for the v5 release but using the v4 release. The docs for the version you are using are at https://rules-proto-grpc.com/en/4.5.0/custom_plugins.html (4.6.0 is not being shown by RTD for some reason)

Sorry, I didn't notice that.
Thanks for your reply! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants