Releases: bazel-contrib/bazel-gazelle
Releases · bazel-contrib/bazel-gazelle
v0.31.1
What's Changed
- point sync.Once in walkConfig by @jmhodges in #1532
- add copylock vet to nogo by @jmhodges in #1534
- bzlmod: Remove deprecated override attributes on
go_deps.module
by @fmeum in #1548 - Add default directives for github.com/envoyproxy/protoc-gen-validate by @mortenmj in #1553
- cmd/gazelle: do not use the epoch as timestamp in diff output by @siddharthab in #1552
- fileinfo: fix not detecting 'unix' files to be OS specific by @sluongng in #1554
- language/go: Emit apparent repo name of rules_go in select keys by @fmeum in #1555
- Let
bazel_dep
s replace Go deps by @fmeum in #1526
New Contributors
Full Changelog: v0.31.0...v0.31.1
v0.31.0
What's Changed
- feat: allow passing GIT_CONFIG_COUNT and it's related configs by @manuelnaranjo in #1462
- feat(bzlmod): add
module_override
tag to allow patching in go_deps by @tyler-french in #1500 - fix typo
build_proto_file_mode
in message by @tyler-french in #1504 - fix: support running within a dir named workspace by @jbedard in #1498
- fix: check for gazelle command before adding -repo_config flag by @cgrindel in #1501
- language/go: Infer prefix from go.mod by @fmeum in #1497
- don't overwrite directives by @tyler-french in #1503
- Support Bzlmod for gazelle itself by @fmeum in #1509
- language/go: Add windows arm64 as a known platform. by @connyay in #1507
- Adding lifecycle manager by @linzhp in #1475
- Disable protobuf generation for more modules by @seh in #1514
- Support '~' in label repo by @mark-thm in #1518
- language/go: Handle
unix
build tag. by @connyay in #1512 - Pass data arg through to sh_binary if defined by @Preston4tw in #1483
- remove circular override hack by @tyler-french in #1515
- Add major version suffix download example by @kriswuollett in #1453
- Relax parsing of labels by @purkhusid in #1508
- bzlmod: Add
build_file_generation
togazelle_override
by @fmeum in #1522 - Fix incremental build of to bootstrap Gazelle by @fmeum in #1529
- Support macros/rules packed within bazel
struct
by @birunts in #1524 - Prefer non-proto over proto deps in external repos by @fmeum in #1537
- bzlmod: Return
extension_metadata
to automateuse_repo
fixes by @fmeum in #1511 - Fix
go:embed
failing to addembedsrcs
for subdirectories named build by @sgavinio in #1539 - Remove support for godep and dep by @sluongng in #1541
- Avoid putting -repo_config after directories by @linzhp in #1544
- Dropping -args by @linzhp in #1546
New Contributors
- @connyay made their first contribution in #1507
- @mark-thm made their first contribution in #1518
- @Preston4tw made their first contribution in #1483
- @kriswuollett made their first contribution in #1453
- @purkhusid made their first contribution in #1508
- @birunts made their first contribution in #1524
- @sgavinio made their first contribution in #1539
Full Changelog: v0.30.0...v0.31.0
v0.30.0
What's Changed
- fix: add missing Starlark dependency and introduce
bzl_test
by @cgrindel in #1413 - Upgrade rules_go and known imports by @linzhp in #1426
- Regenerate known imports from downgraded go_googleapis by @linzhp in #1429
- testdata with buildable Go pkg deep below by @linzhp in #1433
- language/go: add //go:embed all: support by @mbicz in #1432
- Fix
go mod download
output expectation for errors by @illicitonion in #1442 - Apply map_kind to existing rules as well as new ones by @illicitonion in #1425
- Ignore symlinks into Bazel output rather than relying on name by @cpsauer in #1384
- Use
short_path
forgo
in the wrapper by @fmeum in #1446 - feature: gazelle wrapper allows to pass environment variables by @manuelnaranjo in #1438
- Update directive documentation by @moisesvega in #1454
- Update gazelle directive documenmtation. by @moisesvega in #1455
- Default Visibility extension overwrite on descent (fixes #1467) by @dnathe4th in #1472
- Allow keep to be explained by @stevebarrau in #1447
- Respect repo_name in MODULE.bazel for load generation by @fmeum in #1463
- Add
.ijwb
to.gitignore
by @fmeum in #1478 - Use spaces instead of tabs in go_repositor_tools_srcs.bzl by @fmeum in #1479
- Run buildifier by @fmeum in #1480
- bzlmod: Test BCR test module on all platforms by @fmeum in #1481
- bzlmod: Allow overriding default Go module configuration by @seh in #1456
- fix(bzlmod): apply go.sum sums after version resolution by @tyler-french in #1477
- fix(bzlmod/go_deps): don't read go.sum for empty go.mod files by @tyler-french in #1484
- feat(bzlmod): support go.mod replace directives by @tyler-french in #1450
- README update mentioning gazelle-haskell-modules by @kczulko in #1439
- Exclude
.ijwb
from repository tools srcs by @fmeum in #1490 - bzlmod: Fix interaction between replace and implicit upgrade check by @fmeum in #1492
New Contributors
- @darist made their first contribution in #1410
- @mbicz made their first contribution in #1432
- @cpsauer made their first contribution in #1384
- @manuelnaranjo made their first contribution in #1438
- @moisesvega made their first contribution in #1454
- @stevebarrau made their first contribution in #1447
- @seh made their first contribution in #1456
- @kczulko made their first contribution in #1439
Full Changelog: v0.29.0...v0.30.0
v0.29.0
What's Changed
- bzlmod: Update Publish to BCR app config by @fmeum in #1363
- Fix: Skip default_visibility extension logic if no BUILD.bazel file present by @dnathe4th in #1364
- fix updateStmt makeslice panic by @pcj in #1371
- bzlmod: Add missing
strip_prefix
field tosource.template.json
by @fmeum in #1375 - feat: support common test args in
gazelle_generation_test
by @cgrindel in #1377 - Make the new facts pacakge public by @linzhp in #1378
- fix: add timeout message for
gazelle_generation_test
by @cgrindel in #1383 - bzlmod: Add missing repository metadata by @fmeum in #1387
- Replace
cfg = "host"
withcfg = "exec"
by @fmeum in #1395 - upgrade rules_go to 0.37.0 by @JamyDev in #1386
- Fix embed on windows by @st3veV in #1361
- Update bazel-skylib to 1.3.0. by @benjaminp in #1367
- Fix Directives anchor by @jmthvt in #1353
- Use
patch
from@bazel_tools//tools/build_defs/repo
by @tyler-french in #1381 - Add link to BenchSci's rules_nodejs_gazelle extension by @ColinHeathman in #1369
- bzlmod: Skip Go modules available as Bazel modules by @fmeum in #1403
- repo: opportunistically populate RemoteCache from go.mod by @jayconrod in #1396
- Fix Gazelle with
--incompatible_disallow_empty_glob
by @fmeum in #1405 - chore: remove experimental warning from bzlmod module by @alexeagle in #1406
- chore: add Swift extension to language list by @cgrindel in #1412
- Update everything for release prep, add releaser tool by @dnathe4th in #1373
- adding go version and std_package_list to releaser by @linzhp in #1415
New Contributors
- @damingerdai made their first contribution in #1362
- @st3veV made their first contribution in #1361
- @benjaminp made their first contribution in #1367
- @jmthvt made their first contribution in #1353
- @ColinHeathman made their first contribution in #1369
Full Changelog: v0.28.0...v0.29.0
v0.28.0
What's Changed
- language/proto: gen_known_imports creates structs instead of function calls by @eric-skydio in #1333
- Add DoneGeneratingRules language hook by @illicitonion in #1325
- Allow configuring timeout of generation tests by @illicitonion in #1324
- bug: Allow user-specified tags on gazelle rule by @Helcaraxan in #1308
- Replace _get_auth with Bazel's read_user_netrc by @linzhp in #1338
- language/go should consider default_visibility set by OtherGen (#783) by @dnathe4th in #1341
- fix: pass
visibility
attribute forgazelle
macro to resultingsh_binary
by @cgrindel in #1340 - Add additional bzlmod requirements to allow grpc protobufs to work by @shs96c in #1345
- bzlmod: Simplify go_grpc_library support by @fmeum in #1346
- bzlmod: Add support for custom
go_proto_library
compilers by @fmeum in #1348 - Add visibility extension to support recursive default_visibility (#783) by @dnathe4th in #1343
- Make
gazelle_generation_test
respect out suffix when generating golden files by @blorente in #1352 - Add size argument to
gazelle_generation_test
by @charlesoconor in #1351
New Contributors
- @eric-skydio made their first contribution in #1333
- @dnathe4th made their first contribution in #1341
- @cgrindel made their first contribution in #1340
- @shs96c made their first contribution in #1345
- @blorente made their first contribution in #1352
- @charlesoconor made their first contribution in #1351
Full Changelog: v0.27.0...v0.28.0
v0.27.0
What's Changed
- Use repo-relative labels everywhere by @fmeum in #1294
- Fix RST URL errors for rules_jvm by @qaisjp in #1296
- bzlmod prototype by @fmeum in #1266
- bzlmod: Do not create a repository with an invalid name by @fmeum in #1304
- language/go: Add support for //go:build tags by @thempatel in #1243
- Unwrap
go list -m -json
errors correctly by @fmeum in #1301 - Make one more label repo-relative by @fmeum in #1297
- bzlmod: Add go_deps.from_file by @fmeum in #1300
- language: add BaseLang by @sluongng in #1303
- Allow adding arguments to Rules by @illicitonion in #1310
- Register and parse flags before calling Kinds/Loads by @illicitonion in #1318
- SortMacro() should also sort the Loads by @tyler-french in #1321
- bzlmod: Fix canonical label literal after Bazel change by @fmeum in #1322
- update-repos: don't add repositories declared with gazelle:repository… by @tyler-french in #1326
- Look in call args for loadable symbols by @illicitonion in #1317
- SortMacro() should also sort rules by Kind() by @tyler-french in #1327
- bzlmod: Fix missing .format in go_deps by @fmeum in #1330
- bzlmod: Depend on rules_proto by @fmeum in #1331
New Contributors
Full Changelog: v0.26.0...v0.27.0
v0.26.0
What's Changed
- fix(tests): fix gazelle_generation_test expected stderr update by @jbedard in #1220
- Add an e2e test confirming no output on success by @achew22 in #1216
- Update extend.md with a practical languages example by @Anthony-Bible in #1222
- fix: Remove gazelle_binary import collision by @illicitonion in #1226
- Broaden label name regex by @illicitonion in #1229
- gazelle_generation_test: redact workspace path from output by @dr-dime in #1231
- Add -print0 to print names of rewritten files by @dr-dime in #1213
- Code Quality Improvements by @sluongng in #1197
- Add -strict to exit on build file and directive errors by @dr-dime in #1214
- fix(lang/proto): include imports from different targets by @nickgooding in #1237
- Update rules example in README to v0.25.0 by @yujunz in #1240
- Allow static dependency resolution for Gazelle rule by @uhthomas in #1242
- Handle wrapped errors by @illicitonion in #1234
- Go: Update tests to use cmp.Diff instead of reflect.DeepEqual by @thempatel in #1244
- Fix startup script manifest resolution with --nolegacy_external_runfiles by @jvolkman in #1247
- Label's package may contain @s by @illicitonion in #1249
- Trim runfiles prefix consistently by @uhthomas in #1257
- Respect .bazelignore by @Whoaa512 in #1245
- Implement very minimalistic support for go workspaces by @HakanSunay in #1250
- Fix typo in comment by @yujunz in #1270
- Use
patch
from@bazel_tools//tools/build_defs/repo:utils.bzl
by @bozaro in #1269 - Update rules_go to 0.33.0 by @fmeum in #1263
- Add support for auth_patterns in go_repository by @dmivankov in #1254
- Sluongng/revert patch by @sluongng in #1277
- Stop inferring import path for empty packages by @linzhp in #1280
- Don't exclude spaces from the label name regex by @illicitonion in #1271
New Contributors
- @Anthony-Bible made their first contribution in #1222
- @dr-dime made their first contribution in #1231
- @sluongng made their first contribution in #1197
- @nickgooding made their first contribution in #1237
- @yujunz made their first contribution in #1240
- @uhthomas made their first contribution in #1242
- @thempatel made their first contribution in #1244
- @Whoaa512 made their first contribution in #1245
- @HakanSunay made their first contribution in #1250
- @bozaro made their first contribution in #1269
- @fmeum made their first contribution in #1263
- @dmivankov made their first contribution in #1254
Full Changelog: v0.25.0...v0.26.0
WORKSPACE
code
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_gazelle",
sha256 = "501deb3d5695ab658e82f6f6f549ba681ea3ca2a5fb7911154b5aa45596183fa",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz",
],
)
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
############################################################
# Define your own dependencies here using go_repository.
# Else, dependencies declared by rules_go/gazelle will be used.
# The first declaration of an external repository "wins".
############################################################
gazelle_dependencies()
v0.25.0
Go changes
- Introduce static dependency resolution mode which prevents Gazelle from calling out the network.
go_repository
rules now default to this mode, showing significant performance improvements for some repo rules by @blico in #1201 go_repository
rules no longer log Gazelle warnings, unlessdebug
mode is explictly set by @blico in #1205- Support
canonical_id
attribute forgo_repository
by @kmicklas in #1121
Proto changes
General changes
- gazelle_generation_test utility for running the gazelle binary on a set of test workspaces by @aptenodytes-forsteri in #1183
- Introduced
rule.AddAlias
func to support loading aliased symbols by @dorfire in #1127 FixLoad
now generatesload
statements for helper functions by @illicitonion in #1164- Many more bug fixes and documentation updates, thanks to everyone who helped out!
Full Changelog: v0.24.0...v0.25.0
WORKSPACE
code
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_gazelle",
sha256 = "5982e5463f171da99e3bdaeff8c0f48283a7a5f396ec5282910b9e8a49c0dd7e",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
],
)
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
############################################################
# Define your own dependencies here using go_repository.
# Else, dependencies declared by rules_go/gazelle will be used.
# The first declaration of an external repository "wins".
############################################################
gazelle_dependencies()
v0.24.0
This release requires rules_go 0.29 to support the retirement of go_tool_library
.
IMPORTANT
This release includes many new dependencies. Please be sure that your own workspace's dependencies are declared PRIOR to gazelle_dependencies()
, or else they may be overridden. See the prompt block comment in the boilerplate below.
Changes
- .netrc files are now supported for authenticated access for
go_repository
rules (#1090) - There is now a Gazelle extension for authoring BUILD files for the R language, using rules_r.
Fixes
- language/go: don't let 'go mod download' edit go.sum by @jayconrod in #1015
- Label fix: properly parse external references to the main repository by @tfrench-uber in #1006
- gazelle: add -e flag for go list 1.16 by @axelberardino in #1019
- Correctly propagate runfiles from gazelle_bin to gazelle by @HALtheWise in #1008
- Support Label @repo -> @repo//:repo shorthand by @wolfd in #1023
- language/go: rewrite embedResolver to use a tree structure by @jayconrod in #1024
- Respect .bazelignore by @Michaelhobo in #1022
- Change merge behavior to remove attrs instead of panicking by @wolfd in #1031
- Allow ListRepositories to load macros not in Workspace by @tfrench-uber in #1053
- Honor host GOMODCACHE when GO_REPOSITORY_USE_HOST_CACHE by @linzhp in #1069
- language/go: add golang.org/x/tools/internal/typeparams to nogo deps list by @jayconrod in #1074
- Fix "exclude" token parsing by @gibfahn in #1073
- Have label properly resolve directives starting with "@//" by @tfrench-uber in #1086
- Correctly propagate runfiles from data dependencies to gazelle by @alexeagle in #1094
- Add bzl_library targets to Gazelle by @achew22 in #760
- Escape vars in cgo flags with an extra $ by @dierksen in #1107
- autogazelle can build on windows by @asuffield in #1083
- and many documentation updates by @tanyabouman
Full Changelog: v0.23.0...v0.24.0
WORKSPACE
code
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_gazelle",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
],
)
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
############################################################
# Define your own dependencies here using go_repository.
# Else, dependencies declared by rules_go/gazelle will be used.
# The first declaration of an external repository "wins".
############################################################
gazelle_dependencies()
v0.23.0
Changes
- Go
CXXFLAGS
andCPPFLAGS
#cgo
directives are separated intocxxopts
andcppopts
attributes, respectively. Thanks @otan.- Dependencies on mapped kinds are now supported. Thanks @robfig.
- The
gazelle
rule now supports theupdate-repos
command. - The
gazelle
rule now has adata
attribute and expands$(location)
within arguments. go_repository
'sbuild_naming_convention
is now considered when resolving external dependencies. If a repository already has build files, this attribute may be set to indicate which naming convention it follows.embedsrcs
attributes are generated for packages that contain//go:embed
directives.
- Protobuf
proto_strip_import_prefix
may be set in the root build file. Thanks @linzhp.
WORKSPACE
code
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_gazelle",
sha256 = "62ca106be173579c0a167deb23358fdfe71ffa1e4cfdddf5582af26520f1c66f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz",
],
)
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()