Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bazel-contrib/bazel-gazelle
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.37.0
Choose a base ref
...
head repository: bazel-contrib/bazel-gazelle
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.38.0
Choose a head ref
  • 17 commits
  • 56 files changed
  • 9 contributors

Commits on May 29, 2024

  1. Add support for include() in MODULE.bazel (#1810)

    Previously, `gazelle` wouldn't look into `include`ed segments of module files when collecting the apparent to module name mapping.
    fmeum authored May 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f738979 View commit details

Commits on May 30, 2024

  1. feat: gazelle_test test rule (#1785)

    * feat: gazelle_test test rule
    
    * remove no_sandbox attr and add symlink check
    
    * use readlink
    hunshcn authored May 30, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b47ccd0 View commit details

Commits on May 31, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8c16db5 View commit details

Commits on Jun 1, 2024

  1. go_repository: add 'clean' build_file_generation (#1802)

    * go_repository: add 'clean' build_file_generation
    
    Before bzlmod, repositories were global, and BUILD files inside upstream
    repositories could load from the repositories defined at the root-level
    WORKSPACE file.
    
    With the introduction of visibility rules, these result in errors that
    cannot trivially be worked around. One pattern that has emerged is
    ignoring existing build files by specifying `gazelle:build_file_name
    BUILD.bazel`, however this does not work for anything already using
    BUILD.bazel filenames.
    
    This does affect real-world users: an example is
    github.com/google/go-jsonnet which has a BUILD.bazel file to `genrule`
    its AST. The module is pure-go, but the build step contains cpp code,
    and when imported under bzlmod-gazelle will not work because the cpp
    code is invoked. As a workaround, there is now a 'jsonnet' BCR module.
    
    This patch introduces a `build_file_generation = clean` option, which
    removes existing build files before generating new ones. It allows
    loading the jsonnet code once again, and also makes it possible to
    load some of the complex protobuf repositories.
    
    * go_repository: always call fetch_repo, even for urls
    
    After my changes to remove build files as part of fetch_repo, I realized
    that when urls=[] is specified the code path doesn't use fetch_repo at
    all. In this case, fetch_repo_args would remain None, and raise an
    error. Not ideal!
    
    This left me with two general options: either I move the code into a
    separate command invocation, or I have all code go through fetch_repo.
    
    The latter seems to be the pragmatic solution: gazelle by itself doesn't
    generate code with urls=[] (in either bzlmod or vanilla update-repos),
    so it's the option with lower performance impact (also considering we're
    stacking it on top of a network download).
    TvdW authored Jun 1, 2024
    Copy the full SHA
    7d10bf7 View commit details

Commits on Jun 20, 2024

  1. Copy the full SHA
    476a944 View commit details

Commits on Jun 21, 2024

  1. Restore compatibility with Go 1.18 (#1833)

    Also test compatibility of fetch_repo and gazelle.
    fmeum authored Jun 21, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    88fb1cf View commit details

Commits on Jun 25, 2024

  1. Remove reliance on specific canonical repo name scheme (#1835)

    * Remove reliance on specific canonical repo name scheme
    
    Instead of relying on a particular separator char such as `~`, we instead only rely on the guaranteed fact that the apparent name of an extension repo is the last component of its canonical name.
    
    Prepares for bazelbuild/bazel#22865
    
    * Update go_repository_config.bzl
    fmeum authored Jun 25, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    852fdcf View commit details

Commits on Jul 16, 2024

  1. temporarily disable Mac test to fix CI (#1842)

    Builds ([example](https://buildkite.com/bazel/bazel-gazelle/builds/4022#01909d11-a3eb-4f13-bfd9-aa98755ba7d2)) are failing because this test is timing out on Mac OS.
    
    Let's temporarily disable this large test to unblock development.
    
    The `//internal:bazel_test` is still run on `ubuntu2204`
    tyler-french authored Jul 16, 2024
    Copy the full SHA
    e2c894d View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fe3043f View commit details

Commits on Jul 18, 2024

  1. [Gazelle] Fix Duplicate Load Bug (#1841)

    If two extensions both import Kinds from the same file, and no load
    statement for those Kinds is already in the BUILD.bazel file, then
    Gazelle will add the load statement twice.
    
    In this commit, we fix the issue by updating the tracked loads when a
    new load is inserted into the index. This will cause future iterations
    to update the existing load instead of creating a duplicate.
    ckilian867 authored Jul 18, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    906a322 View commit details

Commits on Jul 26, 2024

  1. [Proto] Require space between 'service' and service name in regex mat…

    …ching (#1845)
    
    Prior to this commit, the regex for determining whether a file had
    services did not require a space between the word "service" and the
    service name. This could lead to false alarms, like "message
    serviceABC". In this commit, we update the regex to only match if there
    is at least one space between service and the service name.
    ckilian867 authored Jul 26, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5385064 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bbca748 View commit details

Commits on Jul 27, 2024

  1. Always check files in generation tests (#1847)

    When iterating on new language plugins, it is helpful to have the CheckFiles
    validation run so that any mismatched BUILD file output can be shown.
    
    Replacing `FailNow` with `Fail` allows for this
    Whoaa512 authored Jul 27, 2024
    Copy the full SHA
    50f6959 View commit details

Commits on Aug 1, 2024

  1. Support label using regexp in directive gazelle:resolve_regexp (#1822)

    * Add ability to resolve label using regexp in directive resolve_regexp
    
    * Add unit tests and update documentation
    
    Fix formatting
    
    Update test
    
    Format test
    
    remove extra whitespace
    
    Trigger tests
    
    Fix space
    lkassar-stripe authored Aug 1, 2024
    Copy the full SHA
    226b5ab View commit details
  2. Add external/... prefix to ${SRCDIR} in external repos (#1850)

    Also update `.bazelversion` to work around failures to fetch external repos.
    fmeum authored Aug 1, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bcacc73 View commit details
  3. feat(tools): add a tool to automate the generation of go_deps overrid…

    …es (#1677)
    
    This PR creates a tool that converts either a repository macro file or a WORKSPACE into a set of `go_deps.{}_overrides`. This is supposed to ease the migration to Bzlmod.
    
    Fixes #1675
    tyler-french authored Aug 1, 2024
    Copy the full SHA
    b5802bd View commit details
  4. prepare release 0.38 (#1849)

    * prepare release 0.38
    
    * Update MODULE.bazel
    tyler-french authored Aug 1, 2024
    Copy the full SHA
    cfe9e8f View commit details
Loading