Skip to content

Releases: bazel-contrib/bazel-gazelle

v0.40.0

13 Nov 15:29
e715c13
Compare
Choose a tag to compare

What's Changed

  • do not generate an empty rule if a go_proto_library was already gener… by @davidbyttow in #1927
  • Support MODULE.bazel test cases for gazelle_generation_test. by @gonzojive in #1948
  • Don't call dict.pop() with named arguments by @EdSchouten in #1951
  • go_deps should fail with a clear message when 2 modules that only differ in case are used by @Buzz-Lightyear in #1954
  • feat: warn when it looks like you're using ignore instead of exclude directive by @alex-torok in #1955
  • fix(repo): load repositories should fail on duplicates by @tyler-french in #1937
  • Hard failing if module versions aren't aligned between bazel dep and go.mod for a given module by @Buzz-Lightyear in #1957
  • Warning users when versions requested via bazel_dep and go.mod differ for the same go module by @Buzz-Lightyear in #1963
  • perf: do not revalidate glob expressions on each invocation by @jbedard in #1964
  • refactor: add rule.* type assertions by @jbedard in #1961
  • Fix Bazel module resolution regression in go_deps by @fmeum in #1966
  • go_deps: Support default naming convention override for Bazel modules by @fmeum in #1967
  • Issue #1965 - Fix label resolution for non-captured regex by @alandonham in #1969
  • Bump rules_go & Bazel deps by @fmeum in #1973
  • refactor: change pathTrie per-file to per-directory by @jbedard in #1931
  • Support load fixing on struct members (dotexpr) instead of just callexpr by @aaronsky in #1972
  • Use rules_shell for shell targets by @ted-xie in #1960
  • Remove explicit empty version argument by @fmeum in #1974
  • Revert to empty version and update repo metadata by @fmeum in #1975

New Contributors

Full Changelog: v0.39.1...v0.40.0

v0.39.1

02 Oct 11:58
293a67e
Compare
Choose a tag to compare

Updates rules_go to fix this error:

ERROR: .../external/rules_go~/go/platform/BUILD.bazel: no such target '@@rules_go~//go/platform:qnx': target 'qnx' not declared in package 'go/platform' defined by .../external/rules_go~/go/platform/BUILD.bazel

What's Changed

  • override-generator: allow users to specify default values by @tyler-french in #1910
  • Update rules_go dep to v0.50.1 by @fmeum in #1943
  • Let the Publish to BCR app maintain the module version by @fmeum in #1944

Full Changelog: v0.39.0...v0.39.1

v0.39.0

23 Sep 20:56
d16fc42
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.38.0...v0.39.0

v0.38.0

01 Aug 17:38
cfe9e8f
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.37.0...v0.38.0

v0.37.0

24 May 15:39
4d0129d
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.36.0...v0.37.0

v0.36.0

03 Apr 15:40
1b331b6
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.35.0...v0.36.0

v0.35.0

21 Dec 18:18
f5a5c5d
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.34.0...v0.35.0

v0.34.0

08 Nov 15:00
f4b1e77
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.33.0...v0.34.0

v0.33.0

06 Sep 14:52
061cc37
Compare
Choose a tag to compare

What's Changed

  • Generate BUILD files for grpc-gateway by default by @seh in #1578
  • Remove temporary workaround after rules_go 0.41.0 release by @fmeum in #1577
  • bzlmod: Use first host-compatible SDK to bootstrap Gazelle by @fmeum in #1581
  • Update: golang.org/x/exp & golang.org/x/oauth2 deps. by @sfc-gh-ptabor in #1582
  • [README.rst] Mention kotlin PoC by @kolloch in #1590
  • Fix and let # gazelle:follow accept a glob by @shahms in #1596
  • Add support for isolated go_deps usages by @fmeum in #1584
  • feat(bzlmod): support archive_override in go_deps by @tyler-french in #1559
  • fix: avoid updating WORKSPACE file when running update-repos when bzlmod is enabled by @cgrindel in #1589
  • Make go_deps.from_file compatible with Go 1.21 by @fmeum in #1605
  • go_repository: fix missing default GOPROXY by @sluongng in #1602
  • fix: patch support for dir named workspace by @michaellzc in #1606
  • Revert "go_repository: fix missing default GOPROXY (#1602)" by @sluongng in #1609
  • Upgrade golang.org/x/mod Vendor to Support Go 1.21 by @alan910127 in #1611
  • fix: go_repository: never shadow a module with a compatibility mapping for major versions. by @reltuk in #1608
  • bug fix: don't generate invalid go_binary rules for empty main packages by @andyscott in #1618
  • Fix wrong Kotlin Support link in README. by @duckladydinh in #1619
  • bzlmod: Verify that the lockfile is platform-independent by @fmeum in #1617
  • Add gazelle_rust under supported languages by @Calsign in #1620
  • replace golang.org/x/tools with golang.org/x/tools/go/[email protected] by @malt3 in #1603
  • Implement Merger interface by @Whoaa512 in #1569
  • Improve Gazelle launcher's runfiles discovery on Windows by @fmeum in #1604
  • Add an entry for "github.com/googleapis/gax-go/v2" to default_gazelle_overrides.bzl by @andrewmbenton in #1623
  • add a go_test directive to enable generating go_test targets per _test.go file by @shahms in #1597
  • Detect whether Gazelle itself is a Bazel module by @fmeum in #1624
  • prepare release 0.33 by @tyler-french in #1615

New Contributors

Full Changelog: v0.32.0...v0.33.0

v0.32.0

11 Jul 15:56
154fb90
Compare
Choose a tag to compare

Starting this release, Gazelle no longer resolves Go and proto imports of Google APIs to @go_googleapis. Instead, Go packages from Google APIs will be treated as regular Go packages, and resolve to @org_golang_google_genproto, which contains the pre-generated Go code, with its version determined by Go modules. For proto files importing Google APIs proto and generating Go code, users need to:

  1. Add an http_archive rule to download Google APIs, e.g.,
http_archive(
    name = "googleapis",
    sha256 = "9d1a930e767c93c825398b8f8692eca3fe353b9aaadedfbcf1fca2282c85df88",
    strip_prefix = "googleapis-64926d52febbf298cb82a8f472ade4a3969ba922",
    urls = [
        "https://github.com/googleapis/googleapis/archive/64926d52febbf298cb82a8f472ade4a3969ba922.zip",
    ],
)

load("@googleapis//:repository_rules.bzl", "switched_rules_by_language")

switched_rules_by_language(
    name = "com_google_googleapis_imports",
)

Note that the version of Google APIs archive needs to be compatible with the pre-generated code in @org_golang_google_genproto.

  1. Resolve the proto manually. If Gazelle is being used, directives like the following need to be added to a parent directory of the proto files:
# gazelle:resolve proto proto google/rpc/status.proto @googleapis//google/rpc:status_proto
# gazelle:resolve proto go google/rpc/status.proto  @org_golang_google_genproto//googleapis/rpc/status
# gazelle:resolve proto google/longrunning/operations.proto @googleapis//google/longrunning:operations_proto
# gazelle:resolve proto go google/longrunning/operations.proto @org_golang_google_genproto//googleapis/longrunning

What's Changed

New Contributors

Full Changelog: v0.31.1...v0.32.0