Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/bazelbuild/bazel.git. Pull mirroring updated .
  1. Jan 24, 2025
    • Bazel Release System's avatar
      Release 9.0.0-pre.20250115.2 (2025-01-23) · 926b9ba2
      Bazel Release System authored
      Baseline: 67c89b31
      
      Cherry picks:
      
         + cf701ebe:
           Fix performance regression on builds that change a test
           configuration flag.
      
      Important changes:
      
        - On Linux, the default limit on the number of `--watchfs` file
          events per directory has been raised to 10,000 (from 500). If
          needed, it can be increased further via
          `--host_jvm_args=-Djdk.nio.file.WatchService.maxEventsPerPoll=<lim
          it>`.
      
      This release contains contributions from many people at Google, as well as Fabian Meumertzheim.
    • Googler's avatar
      Fix performance regression on builds that change a test configuration flag. · f6b26e76
      Googler authored
      Instead of `BuildOptionsScopeFunction` requesting `PrecomputedValue.BASELINE_CONFIGURATION`, request it in `BuildConfigurationKeyProducer` only after we know that we truly need it. This way the dependency is only requested if scopes are being applied.
      
      The performance concern still exists if starlark flag scoping is enabled.
      
      PiperOrigin-RevId: 716785874
      Change-Id: Iabd7c11440c70c909f111f1dcafafa3b98610be9
      f6b26e76
  2. Jan 15, 2025
  3. Jan 14, 2025
    • Googler's avatar
      Create symlink trees through the native filesystem, not the action filesystem. · 4e89bc29
      Googler authored
      The comment added in SymlinkTreeStrategy explains why this is required.
      
      Fixes https://github.com/bazelbuild/bazel/issues/24867.
      
      PiperOrigin-RevId: 715305548
      Change-Id: I376d360a0d072c0d5912e14e3115a7fb3b5f2281
      4e89bc29
    • Googler's avatar
      Shard PackageFunctionTest. · cc9eb347
      Googler authored
      https://github.com/bazelbuild/bazel/issues/24776
      
      https://github.com/bazelbuild/bazel/issues/24775
      
      https://github.com/bazelbuild/bazel/issues/24774
      
      PiperOrigin-RevId: 715302446
      Change-Id: Ia6703467b314e072aa125fe2311044bf5fff8053
      cc9eb347
    • Googler's avatar
      Introduce the `experimental_run_in_user_cgroup` option to C++ client. · f50146ed
      Googler authored
      This flag only takes effects on linux.
      
      When enabling this flag on linux, the client creates a temporary script file called `systemd-wrapper.sh`, and the daemonize binary will run this script with `systemd-run` instead of running the Java server directly.
      
      When running the Java server with `systemd-run`, the whole server is put into an user cgroup, and the Java server will have the full control over how the resources in the cgroup are managed.
      
      Note that we need to have `systemd-run` in the environment in order to support this option.
      
      PiperOrigin-RevId: 715302300
      Change-Id: Ib86bada422c76c2528af9d8b11f5efd4c3ec38dc
      f50146ed
    • Googler's avatar
      Set --host_macos_minimum_os in .blazerc. · 3fd29de6
      Googler authored
      Following the advice in https://github.com/bazelbuild/bazel/issues/23116. Without this, I'm unable to build Bazel on my laptop because of errors like:
      
      In file included from external/protobuf+/src/google/protobuf/json/internal/zero_copy_buffered_stream.cc:8:
      bazel-out/darwin_arm64-opt-exec-ST-fad1763555eb/bin/external/protobuf+/src/google/protobuf/json/_virtual_includes/zero_copy_buffered_stream/google/protobuf/json/internal/zero_copy_buffered_stream.h:77:18: error: 'get<std::string, std::string, google::protobuf::json_internal::MaybeOwnedString::StreamOwned>' is unavailable: introduced in macOS 10.13
          return absl::get<std::string>(data_);
                       ^
      
      PiperOrigin-RevId: 715284545
      Change-Id: I2abd81280076e45655276fda82f2d3e451410dd0
      3fd29de6
    • Googler's avatar
      SerializationRegistrySetupHelpers comment fixes. · 90d4c0e3
      Googler authored
      PiperOrigin-RevId: 715216200
      Change-Id: Id6caae28048a537fab4d80436a9ca859de23f14a
      90d4c0e3
    • Googler's avatar
      Do not clear the syscall cache mid-build when uploading to the analysis cache. · 527b0786
      Googler authored
      The FrontierSerializer will reuse the contents of this cache at the end of the
      build. The cache is still cleared at the end of the command (after uploading).
      
      SkyframeExecutor.evaluateBuildDriverKeys has a single caller. Moves its
      invocation of clearSyscallCache to its caller, which already has a cleanup
      finally clause.
      
      PiperOrigin-RevId: 715150110
      Change-Id: I24a0b4c827d752d0784e5d37a309aec02efefda6
      527b0786
    • Googler's avatar
      Add shared value codecs for all configured targets. · 4412a18e
      Googler authored
      The codecs are implemented by using AutoCodec and wrapping with
      ValueSharingAdapter. There are a number of difficulties.
      
      1. AutoCodec is not available in bazel_bootstrap_distfile_test.
      2. AutoCodec generated codecs are not visible as compile-time symbols outside
         the target they are declared in.
      3. We prefer to have the list of codecs available statically.
      
      To work around all these constraints, we load these codecs lazily,
      by reflection, using the initialization on-demand holder idiom.
      
      In all cases except RuleConfiguredTarget, the AutoCodec implementations
      only require correctness of production code. RuleConfiguredTarget, for
      the time being, uses a special AutoCodec.Instantiator to drop actions
      from serialization.
      
      * Narrows createAnalysisCodecRegistrySupplier inputs to make it easier to
        inject.
      
      PiperOrigin-RevId: 715112268
      Change-Id: Iaf8b7e30c576648d930cb51a7a94fd8531ef123b
      4412a18e
    • Googler's avatar
      Add ValueSharingAdapter to convert codecs into value sharing codecs. · 9c2e5bec
      Googler authored
      This is generalized from the value sharing codecs in Label and
      PackageIdentifier.
      
      It will be used to adapt ConfiguredTarget codecs to value sharing.
      
      PiperOrigin-RevId: 715046077
      Change-Id: I2839438f8109c03a5c2997afa612783f77856027
      9c2e5bec
    • Fabian Meumertzheim's avatar
      Include invocation ID in compact execution log · fd6a9833
      Fabian Meumertzheim authored
      This makes it possible to retroactively link an execution log file to a particular build.
      
      Closes #24790.
      
      PiperOrigin-RevId: 715017597
      Change-Id: Ia8f6a3677a165a9f428b59ab8a19587a357b8803
      fd6a9833
  4. Jan 13, 2025
    • Bazel Release System's avatar
      Release 9.0.0-pre.20250106.2 (2025-01-13) · ccdffd2f
      Bazel Release System authored
      Baseline: fa48bc66
      
      Important changes:
      
        - Baseline coverage files are no longer ignored.
        - select() on `cpu`, `host_cpu`, or `crosstool_top now emits a
          "deprecated flag" warning
        - `--max_idle_secs` now takes system sleep time into account when
          deciding when to shutdown the blaze server.
        - Flip --experimental_enable_starlark_set and enable the Starlark
          set data type by default.
      
      This release contains contributions from many people at Google, as well as Alessandro Patti, Boleyn Su, Eric Riff, Fabian Meumertzheim, Keith Smiley, Kiron, Pareesh Madan, Steve Barrau, Torgil Svensson.
      ccdffd2f
    • Googler's avatar
      Remove proto_common from Bazel · 5427b974
      Googler authored
      PiperOrigin-RevId: 714935656
      Change-Id: Idb124b7fe033f4395f6fba4d78b81766474d4ee0
      5427b974
    • Fabian Meumertzheim's avatar
      Report options with `BoolOrEnumConverter` as supporting `--no...` · 6423b04c
      Fabian Meumertzheim authored
      Fixes #24882
      
      Closes #24883.
      
      PiperOrigin-RevId: 714854122
      Change-Id: I5e48e84f88606320223a9969e8367924aeeb13dd
      6423b04c
  5. Jan 11, 2025
  6. Jan 10, 2025
    • Fabian Meumertzheim's avatar
      Add more Bzlmod-related profiler spans · edb2b064
      Fabian Meumertzheim authored
      This fills in a few gaps in the timing profile.
      
      Closes #24762.
      
      PiperOrigin-RevId: 714028550
      Change-Id: I5772b59c5d3b6d73306ea5d8380169465f348f27
      edb2b064
    • Googler's avatar
      Use kythe_ubuntu2404 · ea7d1f07
      Googler authored
      ... which has kythe 0.0.68.
      
      PiperOrigin-RevId: 714012884
      Change-Id: I451ccf9804aead1a57e6d7c5c397a4618a80c22d
      ea7d1f07
    • Fabian Meumertzheim's avatar
      Restore out-of-process symlink tree tests · 1ce427ba
      Fabian Meumertzheim authored
      These tests became ineffective with the flip of `--experimental_inprocess_symlink_creation`.
      
      Closes #24879.
      
      PiperOrigin-RevId: 713986922
      Change-Id: I1f7aa6f1eb37f3907e88054b1221267288ef3ec9
      1ce427ba
    • Googler's avatar
      Run the formatter over some files. · b8f048c7
      Googler authored
      This should be a no-op.
      
      PiperOrigin-RevId: 713981634
      Change-Id: I3df4926f00c92104a9aa5d66950374ad9eb4d4d0
      b8f048c7
    • Googler's avatar
      Automatic code cleanup. · b4f02e58
      Googler authored
      PiperOrigin-RevId: 713963905
      Change-Id: I1d7efddf699cc5c5a43186f65162ac372351f036
      b4f02e58
    • Googler's avatar
      Initial implementation of callViaArgumentProcessor feature in evalCall,... · ee698448
      Googler authored
      Initial implementation of callViaArgumentProcessor feature in evalCall, Starlark, StarlarkCallable and StarlarkFunction.
      
      This is the envisioned alternative to fastcall() where the function parameters aren't stored in intermediate arrays or collections, and instead are directly placed in the right spot in the locals[] array which is then assigned to Frame.locals and thus passed to Eval.execFunctionBody().
      
      PiperOrigin-RevId: 713955817
      Change-Id: I7915783d689c85a0c0346ac325d308d3c4a764fd
      ee698448
    • Googler's avatar
      Remove unreachable default cases from switch expressions on enums · 9b36f96f
      Googler authored
      New `->`-style switch expressions on enums have built-in handling of exhaustiveness, if a default is omitted the switch will implicitly throw a `MatchException` if the switch has an impossible value.
      
      PiperOrigin-RevId: 713785508
      Change-Id: I57614847231568d213c02b0f91b5cb181542ad59
      9b36f96f
  7. Jan 09, 2025
    • Fabian Meumertzheim's avatar
      Mark `--blazerc` as `allows_multiple` in flag docs · e78bab50
      Fabian Meumertzheim authored
      Fixes #24730
      
      Closes #24735.
      
      PiperOrigin-RevId: 713606521
      Change-Id: If8578fcdfc30dcbfb6af283089614f3364eb30d8
      e78bab50
    • Fabian Meumertzheim's avatar
      Reduce retained memory of `UnresolvedSymlinkAction` · 293be8a6
      Fabian Meumertzheim authored
      The required conversion to `PathFragment` can be performed during execution, which avoids retaining a new `PathFragment` instance per action.
      
      Closes #24831.
      
      PiperOrigin-RevId: 713577830
      Change-Id: I2781ea979a3c97abf5a519acd5d3d6a668dd1f77
      293be8a6
    • Fabian Meumertzheim's avatar
      Raise default `--watchfs` event limit · 2280dbab
      Fabian Meumertzheim authored
      By default, the JDK only reports up to 500 events per `WatchKey` (and thus, per directory). This can be too low in large repos.
      
      Work towards #13226
      
      RELNOTES: On Linux, the default limit on the number of `--watchfs` file events per directory has been raised to 10,000 (from 500). If needed, it can be increased further via `--host_jvm_args=-Djdk.nio.file.WatchService.maxEventsPerPoll=<limit>`.
      
      Closes #23682.
      
      PiperOrigin-RevId: 713570760
      Change-Id: Ib3a61ad5d7cfaad4b7bbc25110f854e978e7fa75
      2280dbab
    • Fabian Meumertzheim's avatar
      Add and flip `--incompatible_locations_prefers_executable` · 457d2482
      Fabian Meumertzheim authored
      Work towards #11820
      Fixes #20038
      Fixes #23200
      Fixes #24613
      
      RELNOTES: Extra targets provided to `ctx.expand_location` now expand to their executable (if any) instead of resulting in an error if they provide a number of files different from one.
      
      RELNOTES[INC]: The `--incompatible_locations_prefers_executable` flag has been added and enabled, which makes it so that `ctx.expand_location` expands `$(locations :x)` to the executable of an extra target `:x` if it provides one and the number of files provided by it is not one.
      
      Closes #24690.
      
      PiperOrigin-RevId: 713453768
      Change-Id: I0d6e052bc70deea029554ab722feb544f9597a23
      457d2482
    • Googler's avatar
      Remove references to old coverage implementation · 228519f1
      Googler authored
      PiperOrigin-RevId: 713382378
      Change-Id: If32778574a51375b33a694aa5d31515337d71566
      228519f1
    • Googler's avatar
      Skip module-info files in output_jar · 4e597f2f
      Googler authored
      https://github.com/bazelbuild/rules_java/issues/260
      
      PiperOrigin-RevId: 713312008
      Change-Id: Ifaab4668abbf680912ded440e42bafe0cca7ec27
      4e597f2f
  8. Jan 08, 2025
    • Googler's avatar
      Make isAutomaticExecGroup static and move it to the class ExecGroup · 60e0aa98
      Googler authored
      PiperOrigin-RevId: 713286390
      Change-Id: Ie92fb75a80adf9272a9da5274bfbefb657f99bc5
      60e0aa98
    • Fabian Meumertzheim's avatar
      Remove autoload warnings, improve errors and fix legacy repo name support · eba20543
      Fabian Meumertzheim authored
      This reduces noise while giving users more actionable information when they actually use a symbol that failed to autoload.
      
      Also ensures that modules with legacy repo names (`com_google_protobuf` and `build_bazel_apple_support`) are handled correctly.
      
      Fixes #23929
      Fixes #24597
      
      Closes #24601.
      
      PiperOrigin-RevId: 713208045
      Change-Id: I81ae8e9e09dd3a935dca2897fe9fc58d52189a07
      eba20543
    • Fabian Meumertzheim's avatar
      Use shorthand display form in `Label#debugPrint` · e0fada9d
      Fabian Meumertzheim authored
      This makes the output, which is meant to be friendly to humans, more concise. If users want `//foo` to be `print`ed as `//foo:foo`, they can specify `sep = ""` and also print `:foo`, but stripping the name off is not possible without this change.
      
      Closes #24840.
      
      PiperOrigin-RevId: 713207601
      Change-Id: I474fc4eccb1419304368a5c90a22c13b2197b699
      e0fada9d
    • Googler's avatar
      Add a ".label" field to ctx in materializers. · 0d02e691
      Googler authored
      RELNOTES[NEW]: Materializer functions now have access to the label of the rule they are running on as ctx.label .
      
      PiperOrigin-RevId: 713204307
      Change-Id: I05c9212435fbece4b0444b5b671372c8ba5f31a9
      0d02e691