-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
rules_go + protobufs + experimental_sibling_repository_layout fails to build #3947
Comments
I looked into this and the root cause is that:
This looks like a bug in |
/cc @comius |
…utomatically if the version of Bazel used does not contain the native version of aar_import. This also updates the version of rules_android to the latest commit, because version 0.1.1 is basically just wrappers around the native versions of the rules. This also disbles `--experimental_sibling_repository_layout` added in bazel-contrib@b6631f9 because the latest rules_android uses protos in go, and there is a problem compiling protos in go with `--experimental_sibling_repository_layout`: bazel-contrib/rules_go#3947 Fixes bazel-contrib#1139.
…utomatically if the version of Bazel used does not contain the native version of aar_import. This also updates the version of rules_android to the latest commit, because version 0.1.1 is basically just wrappers around the native versions of the rules. This also disbles `--experimental_sibling_repository_layout` added in bazel-contrib@b6631f9 because the latest rules_android uses protos in go, and there is a problem compiling protos in go with `--experimental_sibling_repository_layout`: bazel-contrib/rules_go#3947 Fixes bazel-contrib#1139.
Just chiming in to say I got bitten by this today and that I wasn't able to find an obvious workaround on the I can't quite follow how this is supposed to be behaving but if folks can provide pointers I'd be happy to take a crack at fixing this since it has other knock-on consequences for us. Specifically we encountered this in the buildozer build; sample sandbox error below.
|
…fter the native version was removed from Bazel (#1149) * Update rules_jvm_external to use the Starlark version of aar_import automatically if the version of Bazel used does not contain the native version of aar_import. This also updates the version of rules_android to the latest commit, because version 0.1.1 is basically just wrappers around the native versions of the rules. This also disbles `--experimental_sibling_repository_layout` added in b6631f9 because the latest rules_android uses protos in go, and there is a problem compiling protos in go with `--experimental_sibling_repository_layout`: bazel-contrib/rules_go#3947 Fixes #1139. * Restore .bazelrc * Don't overwrite bazelrc * Update rules_android commit to inclue bazelbuild/rules_android@d25741d * Update comments * Update to latest rules_android commit * Load the rules_android rules before rules_kotlin to avoid the version of rules_android that rules_kotlin uses * Update .bazelversion from 7.1.0 to 7.2.1 * Add dependencies for "aar_import_that_consumes_the_downloaded_file_directly" because Starlark aar_import checks that there are no missing class imports in aars * Workarounds for aar_import ImportDepsChecker checks * Remove unnecessary com.google.ar.sceneform:assets:1.10.0 dep and revert regression_testing_coursier_install.json * Use the native Android rules in WORKSPACE via rules_android 0.1.1 for use with bazel 5 and bazel 6 in CI * Update to latest rules_android * Update to latest rules_android * Update to rules_android 0.5.1, address review comments
What version of rules_go are you using?
0.48. The issue also reproduces at commit 354a98f.
What version of gazelle are you using?
N/A
What version of Bazel are you using?
7.1.2
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Debian-based Linux variant, x86_64 architecture.
Any other potentially useful information about your toolchain?
N/A
What did you do?
See repro at https://github.com/ted-xie/rules_go_proto_bug. TL;DR building a go_proto_library rule that's part of an external dependency with
--experimental_sibling_repository_layout
fails. Failure message:What did you expect to see?
I expected the build to succeed.
What did you see instead?
The build fails due to the go proto compiler not being able to find the proto definition.
/cc @ahumesky
The text was updated successfully, but these errors were encountered: