Closed ted-xie closed 3 months ago
One other note: This is currently breaking BazelCI for rules_android.
OK, I think I found a workaround for this. It turns out that my go sdk version in WORKSPACE was too old somehow (was 1.20.5; bumping to 1.22.4 helped). I also had not set the SDK version properly in MODULE.bazel, so I think what happened was that the bzlmod invocation was pulling a sufficiently modern SDK, while the WORKSPACE invocation was locked to an older one.
What version of rules_go are you using?
0.48.0
What version of gazelle are you using?
0.28.0
What version of Bazel are you using?
7.2.0rc2
Does this issue reproduce with the latest releases of all the above?
Yes.
What operating system and processor architecture are you using?
Debian Linux derivative; x86-64
Any other potentially useful information about your toolchain?
N/A
What did you do?
What did you expect to see?
I expected both invocations to behave identically; either both pass or both fail.
What did you see instead?
The
--enable_bzlmod
command succeeds, but the--noenable_bzlmod
command fails.Looking deeper at the failed commands, I see that the bzlmod run has a fully-populated packages.txt for the context for its GoCompilePkg mnemonic. That packages.txt contains
slices
. Looking at the packages.txt for the non-bzlmod run, it seems to have a similar list of packages, butslices
is conspicuously missing.