Allow bazel test //... to run out-of-the-box #4150
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
This PR fixes 3 issues which caused an invocation of
bazel test //...
in a clean checkout of the repository to faildepending on potential contributor's development environment.
generate_imported_dylib.sh
go env GOTOOLCHAIN
setFor 1, this PR wraps the
generate_imported_dylib.sh
in genrules sothat the build will just automatically create the dynamic libraries
appropriate for the platform.
For 2, the PR adds a
--java_runtime_version=remotejdk_21
argument tothe one test in
lcov_coverage_test.go
that needs to be able to builda Java rule.
For 3, the PR upgrades
gazellle
to version 0.39.1 and updates theexcludes lists in the
popular_repos.py
file to handle the latestversions of those popular repos. This upgrade addresses the problem
because bazel-contrib/bazel-gazelle#1858 is
fixed in that version of gazelle.
BONUS: Also, there were a few TODOs left in the
WORKSPACE
and.bazelrc
files which were addressed by upgrading to the latestgazelle
version. So, this PR cleans those up at the same time.Which issues(s) does this PR fix?
Fixes #4149
Other notes for review
I have tested this on the following two machines:
macos (M3 arm64)
linux (amd64)
In both cases, I can clone the repository into an fresh directory hop
onto the
build-fixes
branch and run:And, it actually has all 452 tests passing within 30 minutes or so.
On both machines,
go env GOTOOLCHAIN
isgo1.23.2
and$JAVA_HOME
is not set on either machine.