New features
- Gazelle now generates a single
go_test
target when both internal and
external test sources are present. This allows external tests to depend on
definitions within internal tests.gazelle fix
will squash or rename
existing rules named"go_default_xtest"
. srcs
attributes are now flat: they will no longer contain platform-specific
select
expressions. rules_go will filter sources with build constraints
automatically. This allows broader usage of thegoos
andgoarch
attributes
ingo_binary
, but there are still problems withselect
indeps
. See the
cross-compile FAQ
for more information.importmap
attributes are added forgo_library
andgo_proto_library
rules
in vendor directories. This prevents conflicts when multiple packages with
the sameimportpath
are linked into the same binary.- Proto imports of Well Known Types are now resolved to standard locations in
@io_bazel_rules_go//proto/wkt
. go_repository
now supports abuild_extra_args
attribute, allowing
additional arguments to be passed to Gazelle during build file generation.gazelle update-repos
will now loadgo_repository
from@bazel_gazelle
.
The old copy in@io_bazel_rules_go
is deprecated.gazelle fix
will also
fix this.
Notes
- The minimum compatible version of rules_go is now 0.11.0. This is primarily
due to the need forimportmap
ongo_proto_library
. Older versions may
work if you're not using protos.