Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/bazelbuild/bazel.git. Pull mirroring updated .
  1. Apr 23, 2025
  2. Apr 22, 2025
  3. Apr 21, 2025
    • Googler's avatar
      Use `AtomicReference` for `skyValueVersion` to make... · 5e15723f
      Googler authored
      Use `AtomicReference` for `skyValueVersion` to make `RemoteAnalysisCachingEventListener` class fully `@ThreadSafety.ThreadSafe`.
      
      This is just a drive-by clean-up.
      
      PiperOrigin-RevId: 749778628
      Change-Id: I114ea6ad07da21253851bd40cd20ed9ddafc9495
      5e15723f
  4. Apr 19, 2025
  5. Apr 18, 2025
    • Googler's avatar
      Fix query --output=build ClassCastException · c3290e47
      Googler authored
      This was caused by the output formatter thinking a ComputedDefault attribute that depends on a select()able attribute is itself a select().
      
      --output=build then tries to reform the computed default as a select(), which isn't possible.
      PiperOrigin-RevId: 749022313
      Change-Id: I87903b8bb7225eef1117d7b93925775e7d3b54c9
      c3290e47
    • Bazel Release System's avatar
      Release 8.2.1 (2025-04-17) · 30c876a7
      Bazel Release System authored
      Release Notes:
      30c876a7
  6. Apr 17, 2025
    • Googler's avatar
      Boilerplate reduction refactoring for frontier serializer tests. · f9e3161e
      Googler authored
      PiperOrigin-RevId: 748671007
      Change-Id: I5f2830218869ddd4ed87512900eff1bd95ca9db4
      f9e3161e
    • Ankush Chudiwal's avatar
      fix(downloader): handle invalid regex in downloader config · 99a27ec1
      Ankush Chudiwal authored
      #### **Description:**
      This pull request addresses **Issue #20832**, where an invalid regex in the `--experimental_downloader_config` file caused Bazel to **crash silently without an error message**.
      
      #### **Changes Introduced:**
      - **Added a try-catch block** to catch `PatternSyntaxException` when compiling regex patterns in `UrlRewriterConfig.java`.
      - **Throws a `UrlRewriterParseException`** with a clear error message instead of crashing.
      - **Includes details on the regex error**, such as the invalid sequence and its index in the pattern.
      
      #### **Before the Fix:**
      - An invalid regex in `downloader.cfg` (e.g., `rewrite (.*\maven.org/.*) http://example.com/mirror/$1`) caused **Bazel to crash with error code 37**, but **no explanation was given**.
      
      #### **After the Fix:**
      - Users now see a **clear error message** pointing out the invalid regex and its exact issue:
        ```
        Invalid regex in `rewrite`: Illegal/unsupported escape sequence at index 4 in `(.*\maven.org/.*)`
        ```
      - This helps users quickly debug and fix their configuration.
      
      #### **Testing & Verification:**
      - Manually tested by providing valid and invalid regex patterns in `downloader.cfg`.
      - Verified that valid patterns work correctly and invalid patterns produce a proper error message.
      
      #### **Impact & Notes:**
      - No breaking changes.
      - Improves **developer experience** by preventing silent crashes and providing actionable feedback.
      
      #### **Related Issue:**
      Closes #20832
      
      Closes #25380.
      
      PiperOrigin-RevId: 748542218
      Change-Id: Iba2201874c03b81898be15be43213a9e123e1f60
      99a27ec1
    • Benji Vos's avatar
      macOS: respect DEVELOPER_DIR for Xcode selection. · d2e8c825
      Benji Vos authored
      On macOS, this change ensures that when `DEVELOPER_DIR` environment variable is used, it will be propagated to `/usr/bin/xcrun` to query the SDKROOT. This takes precedence over the `--xcode_version` flag when selecting the Xcode installation. This aligns with the intended use as documented in `man xcrun`:
      
      `The tool xcode-select(1) is used to set a system default for the active developer directory, and may be overridden by the DEVELOPER_DIR environment variable (see ENVIRONMENT).`
      
      To leverage this, developers must propagate the `DEVELOPER_DIR` environment variable to Bazel actions using `--action_env=DEVELOPER_DIR`.
      
      Closes #25657.
      
      PiperOrigin-RevId: 748404233
      Change-Id: I52181098658d33e2bd2ec992ad1cd38d64abb293
      d2e8c825
    • Fabian Meumertzheim's avatar
      Add and set `--guard_against_concurrent_changes=lite` · 183b515a
      Fabian Meumertzheim authored
      Without `--guard_against_concurrent_changes`, locally executed actions can easily pollute the disk or remote cache when inputs are modified during execution, which is in stark contrast to Bazel's correctness guarantees. But with the flag enabled, the additional file system operations can unnecessarily slow down non-interactive builds and also, in rare but not negligible cases, result in false positives, which has made it difficult to flip the flag.
      
      This change aims to resolve this issue by introducing a "lite" value of the flag that only checks source files in the main repository. Since output files are made read-only after digesting and files in external repositories are rarely modified during execution (`local_repository` being a notable exception), this gets most of the benefits for correctness while requiring far fewer stats (99% fewer calls to `wasModifiedSinceDigest` on the Bazel project). It also avoids the false positives that can arise for output files, which makes it possible to enable by default.
      
      Along the way, this change unifies concurrent change detection between `RemoteSpawnCache` and `RemoteSpawnRunner` by moving it into `RemoteExecutionService#uploadOutputs`. The implementation in `RemoteSpawnRunner` required two stats per input and the `RemoteSpawnCache` implementation unnecessarily retained the spawn input mapping, both of which is fixed in the new, centralized implementation.
      
      Work towards #3360
      
      Closes #25569.
      
      PiperOrigin-RevId: 748335191
      Change-Id: I72982419ade5c32bfe809910dd0c3a0577a3eb48
      183b515a
  7. Apr 16, 2025
  8. Apr 15, 2025