WORKSPACE
code
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
sha256 = "fcafde4bc064dc4e2b37b910e1aa61853a6e654e1927671eaca4853678f071d7",
urls = [
"https://mirror.bazel.build/github.com/bazel-contrib/rules_go/releases/download/v0.51.0-rc1/rules_go-v0.51.0-rc1.zip",
"https://github.com/bazel-contrib/rules_go/releases/download/v0.51.0-rc1/rules_go-v0.51.0-rc1.zip",
],
)
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies()
go_register_toolchains(version = "1.23.3")
What's Changed
- Lazy expand absolute path to avoid including them in the output by @AlessandroPatti in #4009
- Stop splitting sources in emit_archive by @dzbarsky in #4015
- Remove split_srcs by @dzbarsky in #4019
- Remove orig_src_map by @dzbarsky in #4025
- Simplify how we emit GoStdLib by @dzbarsky in #4026
- Cleanup GoArchiveData runfiles handling by @dzbarsky in #4024
- Use depset for SDK files by @dzbarsky in #4014
- Tweak how we pass GOEXPERIMENT to actions by @dzbarsky in #4022
- Remove get_nogo from context by @dzbarsky in #4029
- Remove mode from GoArchive by @dzbarsky in #4028
- Remove cgo_deps from GoSource provider by @dzbarsky in #4031
- Cleanup binary extension computation by @dzbarsky in #4033
- add docs for
go_deps.gazelle_default_attributes
by @tyler-french in #4021 - Tweak nogo archive handling by @dzbarsky in #4023
- Prefer rfind to rpartition in go_context by @dzbarsky in #4035
- Add qnx and osx platforms by @hofbi in #4036
- Move PATH env-var computation to GoContextInfo by @dzbarsky in #4037
- Turn source.cover into a depset by @dzbarsky in #4039
- Create shallower runfiles by @dzbarsky in #4040
- docs: add missing anchor to Bazel toolchains definition by @albertocavalcante in #4042
- Cleanup compilepkg flags handling by @dzbarsky in #4043
- GoSource can store dependent archives instead of full deps by @dzbarsky in #4041
- Remove some fields from Go context by @dzbarsky in #4034
- Optimize CcInfo computation by @dzbarsky in #4020
- Remove GoSource/GoLibrary from test/binary rules by @dzbarsky in #4044
- Remove orig_srcs by @dzbarsky in #4038
- Cleanup infer_importpath by @dzbarsky in #4047
- Cleanup importpath/importmap handling in go_context by @dzbarsky in #4052
- Remove cgo_exports from GoSource by @dzbarsky in #4051
- gomock: support uber's
-typed
flag by @maratori in #4017 - Making gopackagesdriver correctly handle relative queries made from a subdirectory. by @waltercacau in #4002
- Cleanup GoArchiveData usage of as_tuple by @dzbarsky in #4032
- Cleanup get_mode by @dzbarsky in #4055
- Cleanup _merge_embed by @dzbarsky in #4048
- Remove mode_tags_equivalent by @dzbarsky in #4057
- Remove more hasattr/getattr calls in go_context by @dzbarsky in #4054
- Speedup get_mode some more by @dzbarsky in #4056
- Support GOOS=wasip1 by @rockwotj in #4045
- Remove as_list/as_iterable usage from go_path by @dzbarsky in #4059
- Remove usage of _flatten_possibly_transitioned_attr in common case by @dzbarsky in #4060
- Document the
suffixes
attribute ofgo_proto_compiler
by @leskin-in in #3970 - Simplify duplicate importmap handling by @dzbarsky in #4016
- More go_context speedups by @dzbarsky in #4058
- builder: work around change in filepath.EvalSymlinks behavior by @jayconrod in #4050
- Handle targets provided in deps as a result of GoSource.resolver by @dzbarsky in #4063
- make
go_reset_target
public by @tyler-french in #3965 - Cleanup coverdata handling in compilepkg by @dzbarsky in #4068
- gomock: allow passing extra flags to mockgen_tool by @TvdW in #4066
- Update nogo.rst by @tyler-french in #4071
- [context.bzl] add more helpful debug message to resolver issue by @tyler-french in #4072
- Forward
-testfilter
to nogo and fix failure in case of no srcs by @fmeum in #4075 - prepare rules_go release 0.50.0 by @tyler-french in #4064
- Do not report nogo diagnostics for cgo generated files by @fmeum in #4081
- Run nogo on internal and external tests libs, not testmain by @fmeum in #4082
- Only print type-checking error once in nogo by @fmeum in #4083
- prepare patch release 0.50.1 by @tyler-french in #4087
- Always omit -pie from cc_toolchain linker flags by @siddharthab in #3693
- Use -gcflags=--pgoprofile instead of -pgo when building stdlib by @JacobOaks in #4097
- make toolchains repo more reproducible by @malt3 in #4099
- feat(gpd): add overlay support for gopackagesdriver by @LWarrens in #4101
- Remove unneeded packages from stdlib by @dzbarsky in #4093
- Mark deps explicitly added with
//go get
as direct by @fmeum in #4027 - Update Go SDK to 1.23.1 by @fmeum in #4105
- fix(gpd): keep compiled files from stdlib packages in #4114
- fix(gpd): add missing condition in MoveTestFiles() in #4118
- feat(gpd): support of GOPACKAGESDRIVER_BAZEL_COMMON_FLAGS env variable in #4117
- feat(stdlib): update TAG_AFFECTS_STDLIB dict for Go versions 1.20..1.23 in #4122
- bzlmod.md: update style of code by @tyler-french in #4123
- fix(compile): add missing GOAMD64 and GOARM env values in goctx.env_for_path_mapping in #4121
- go_sdk: Add missing arguments to cross-platform SDKs by @fmeum in #4125
- Let the Publish to BCR app maintain the module version by @fmeum in #4126
- Fix
GoArchiveData
docs by @fmeum in #4130 - fix: fix slice init length by @cuishuang in #4133
- Make it easier to parse rules_go's .bzl files with Go Starlark by @EdSchouten in #4140
- Add support for spaces and newlines in runfiles paths by @fmeum in #4136
- feat: avoid cc toolchain selection (#4145) by @sallustfire in #4146
- Allow bazel test //... to run out-of-the-box by @eljobe in #4150
- Support .syso files in the
srcs
lists forgo_library
andgo_test
rules. by @eljobe in #4151 - fix: properly expand absolute path placeholder for link calls by @voxeljorge in #4144
- Speedup compilepkg args handling by @dzbarsky in #4074
- Improve runfiles docs with examples and more deprecations by @fmeum in #4163
- Fix
go_tool_binary
non-hermeticity and Go 1.19 incompatibility by @fmeum in #4167 - fix: tests respect --strip like binaries (#4103) by @ajwerner in #4164
- Raise minimum Bazel version to 6.5.0 by @fmeum in #4171
- chore: removed some unused vars by @hauserx in #4175
- Merge GoLibrary and GoSource providers by @dzbarsky in #4030
- gomock: fix for golang.org/x/tools >= v0.27.0 by @pjjw in #4173
- prepare rules_go release 0.51.0-rc1 by @tyler-french in #4176
- fix(go/tools/releaser) allow prereleases by @tyler-french in #4177
- fix(go/tools/release): fix urls to use bazel-contrib by @tyler-french in #4178
New Contributors
- @AlessandroPatti made their first contribution in #4009
- @dzbarsky made their first contribution in #4015
- @hofbi made their first contribution in #4036
- @albertocavalcante made their first contribution in #4042
- @maratori made their first contribution in #4017
- @waltercacau made their first contribution in #4002
- @rockwotj made their first contribution in #4045
- @leskin-in made their first contribution in #3970
- @TvdW made their first contribution in #4066
- @cuishuang made their first contribution in #4133
- @sallustfire made their first contribution in #4146
- @eljobe made their first contribution in #4150
- @voxeljorge made their first contribution in #4144
- @ajwerner made their first contribution in #4164
- @pjjw made their first contribution in #4173
Full Changelog: v0.50.1...v0.51.0-rc1