This project is mirrored from https://github.com/bazelbuild/bazel.git.
Pull mirroring updated .
- Jul 16, 2025
-
-
Benjamin Peterson authored
Your regularly scheduled bump of EP. Closes #26519. PiperOrigin-RevId: 783656010 Change-Id: Icd941f468c87022dfce2c030781d79639390fa7e
-
Jonathan Woodbury authored
Closes #26540. PiperOrigin-RevId: 783497990 Change-Id: I08ff948dda75cf46fdc5afe596e373ff0b034b5b
-
Googler authored
Repo rule logic is now completely decoupled from build rule logic. Time to delete some code! - `Package`s can no longer be "repo rule packages". All related logic is deleted. - In particular, `Package#getSourceRoot` returns a `Root` instead of an `Optional<Root>`. - `RuleClass` can no longer be of type `WORKSPACE`. - `TargetDefinitionContext#fromOrFail` and friends have all mention of `WORKSPACE` scrubbed. Fixes #26131. PiperOrigin-RevId: 783419143 Change-Id: Ibb3d1988b1c62b5cd6c8ea9137b5ccacc58db489
-
Fabian Meumertzheim authored
`path_mapping_test` didn't set `CC=clang` and thus didn't actually cover the case of compilation with `--features=layering_check`. As a result, it wasn't noticed that 2dd545b4 regressed path mapping support for this feature. Fixing this requires wiring up `ParameterFileWriteAction` with path mapping and allowing it to be opted in via execution info, as well as restoring the `CppModuleMap` mnemonic it had before Starlarkification. RELNOTES: `ctx.actions.write` now supports path mapping when passed an `Args` object. Use the `mnemonics` attribute to assign it a dedicated mnemonic, which can then be used with `--modify_execution_info` to opt in to path mapping (see https://github.com/bazelbuild/bazel/discussions/22658 for details on path mapping). Closes #26287. PiperOrigin-RevId: 783412764 Change-Id: I46c1977c41fc02cc3a350e0c85220128221b0dc3
-
Googler authored
PiperOrigin-RevId: 783382922 Change-Id: I3fd77aadce0d6ae74f57198662bc28a110b6adc7
-
- Jul 15, 2025
-
-
Googler authored
This class (aka EPERM) is easily confused with FileAccessException (aka EACCES) and only referenced in a test. Furthermore, EPERM isn't always related to *file* permissions. PiperOrigin-RevId: 783323732 Change-Id: Ie0658759aa77437d91af5dd67963cddfb6bad449
-
Googler authored
These methods are not needed in the native part of Bazel. It makes Starlarkification of CcInfo easier. PiperOrigin-RevId: 783300453 Change-Id: I55783ebc0753201f71fd5d02baf457b520061aa1
-
Googler authored
Playing around with the threshold I settled on 1kb. This seems to be a sweet spot for having the minimum number of objects compressed and getting the maximum overall number of bytes reduced. RELNOTES:none PiperOrigin-RevId: 783277456 Change-Id: Iacca782eccccc299a4e5a5c7002a71c73b2366f6
-
Googler authored
Better reflects the fact that these are for recording the line number for a function definition only. PiperOrigin-RevId: 783254614 Change-Id: I6effeb623321de1249a9cefce8e763997d59b279
-
Googler authored
Adds a flag to determine if the tool should output BA lines or BRDA lines for branch coverage with the latter being the default. This means we will no longer output "mixed" data and allows us to simplify the handling and storing of branch information: The data in BranchCoverage is now much simpler to interpret. Further, BA lines are only used internally with the gcov tooling having switched to BRDA lines long ago so it is quite unlikely that Bazel users will ever notice a change. PiperOrigin-RevId: 783253678 Change-Id: I5c11aef3dd654be644fbfc028c9efc023c1ff75a
-
Googler authored
Delete unused open-source Bazel Android BUILD files These have been migrated to rules_android already. END_PUBLIC PiperOrigin-RevId: 783044197 Change-Id: Ib4847becad68d8327c524cf9bc24e613d76236c1
-
Googler authored
All WORKSPACE logic is gone. PiperOrigin-RevId: 783040127 Change-Id: I595fcfd8b2d28f0daafd05edbc3bae89606216a7
-
Googler authored
Replace virtual source root handling for symlink forest creation with single source root handling. Nothing that needs to plant the exec root symlink forest uses a virtual source root anymore. PiperOrigin-RevId: 783025767 Change-Id: I7e6cd11e260846be6b5b9f37a7e827bc4425cc3f
-
Googler authored
*** Reason for rollback *** Breaks various integration tests. The symptom is a visibility error from the cc allowlist to CC rule instantiations in the mock environment. From what I can tell, the mocks look set up correctly, but several Blaze integration tests fail with the same error, so it might be something subtle in the mock setup. *** Original change description *** Internal change. PiperOrigin-RevId: 783025116 Change-Id: Id026b8aad5d6189bf59117c0412f1916aba8a9cf
-
Googler authored
Remove logging of transient file read failures while printing cached test results. This has never found an actual bug in Bazel. RELNOTES: None PiperOrigin-RevId: 783019268 Change-Id: Id854cb27bd1c3ffdedc025acb18949232466ae44
-
Jordan Mele authored
For #26222. Repository tests were making use of `--action=K=V` and have been updated to use `--repo_env=K=V` where appropriate. Closes #26489. PiperOrigin-RevId: 782956293 Change-Id: Ibf5bb80b7366481b31e32de61351b5b43cebefbd
-
Googler authored
This field represents the difference between the current and previous evaluating version baselines. PiperOrigin-RevId: 782940489 Change-Id: I455b9fff057280ebe85554eecea70b197bef0236
-
- Jul 14, 2025
- Jul 12, 2025
-
-
Bazel Release System authored
Baseline: 07bd9661 Important changes: - Branches will always be merged as best as possible based on branch and block numbers during coverage report generation. - `--experimental_worker_for_repo_fetching` is removed. - Modules backed by `http_archive` or `git_repository` no longer require a MODULE.bazel file to be contained in the source archive. This release contains contributions from many people at Google, as well as Adrian Vogelsgesang, Benjamin Peterson, dependabot[bot], Fabian Meumertzheim, Javier Maestro, Jordan Mele, Keith Smiley, Xdng Yng.
-
Googler authored
PiperOrigin-RevId: 782066432 Change-Id: I423faa7b1d3ddc07bf89803e182a8eff0040aa0f
-
Googler authored
PiperOrigin-RevId: 782044428 Change-Id: I12faa2d2a6c77c3f21706fd56f73fb644e8d8ce1
-
Googler authored
PiperOrigin-RevId: 782002621 Change-Id: I8634c95c51e2325d12fa4e200708f1701c66193d
-
- Jul 11, 2025
-
-
Googler authored
It isn't a thorough test, but it ensures the code is executed in a simple test case. The JSON is largely copied from a trivial binary built with GCC 14.2.0. PiperOrigin-RevId: 781975836 Change-Id: I22e91e1ea33d9d1b17ac94020641e8d3a5a0f02a
-
Yun Peng authored
Fixes https://github.com/bazelbuild/bazel/issues/18683 Related: https://github.com/protocolbuffers/protobuf/issues/20085 This change is a rework of https://github.com/bazelbuild/bazel/pull/26005 to enable short virtual includes based on a cc feature, therefore we can limit the change to only MSVC compiler on Windows. RELNOTES: If a cc toolchain feature named `shorten_virtual_includes` is enabled, virtual include header files are linked under `bin/_virtual_includes/<hash of target path>` instead of `bin/<target package path>/_virtual_includes/<target name>`. This shortens the virtual include paths which is critical for mitigating long path issue with MSVC on Windows. Closes #26528. PiperOrigin-RevId: 781975309 Change-Id: Ia573a5f25707ad2462aa3a4459fc66db1779df36
-
Googler authored
The test `testDifferentFiles` was failing because the `WriteEmptyOutputAction` was not overwriting the output file if it already existed. This caused the test to fail if a previous test had written to the same file. This change removes the check for the existence of the file, ensuring that the file is always overwritten. PiperOrigin-RevId: 781972788 Change-Id: Ie07886836b445c2b695a8bdfb896b41cb867af24
-
Fabian Meumertzheim authored
Fixes #26494 Closes #26516. PiperOrigin-RevId: 781682351 Change-Id: Id982ff70dd8b561b9a6c8f4c620c13d3bb913e02
-
Googler authored
Apologies for the size of this CL, but I couldn't really see a way to do this in incremental steps while actually exercising the new logic. - When in the context of repos, `Rule` is replaced with `RepoDefinition` and `RuleClass` is replaced with `RepoRule`. - In a follow-up, we can remove all repo-related logic from `Rule` and `Package`. - `BzlmodRepoRuleFunction`/`Value` are moved into the `lib/bazel/repository` package and renamed to `RepoDefinitionFunction`/`Value`. - The logic to type-check attribute values is now shared between `TypeCheckedTag` and `RepoRule`, and extracted into an `AttributeUtils` class. - The label-validation logic that used to live in `AttributeValues` is also moved into `AttributeUtils`. - `AttributeValues` now explicitly requires all attribute values to be valid Starlark values, instead of performing another transformation on construction. IMO this improves clarity. - `bazel mod show_repo` now uses its own "repo definition printer", which also does away with a lot of useless information (like the call stack of repo rules -- the location suffices). Work towards #26131. Closes #26493. PiperOrigin-RevId: 781569471 Change-Id: I7b66720e8bbe5a756bc216fd07fd1b7e6c21ab3c
-
- Jul 10, 2025
-
-
Googler authored
Saving instances of Throwable in static fields is discouraged, prefer to create them on-demand when an exception is thrown PiperOrigin-RevId: 781550007 Change-Id: I5975b88398460aad4ddc9ea3a0b21573a6edf23b
-
Yun Peng authored
- Updated protobuf and grpc to the latest version (protobuf -> 31.1, grpc -> 1.73.1) - apple_support was updated due to protobuf and addressed a few breaking changes - Applied new protobuf patch to address newly discovered issues (1. [`lite_runtime_only` visibility](https://github.com/protocolbuffers/protobuf/commit/079be27925955348d1b3cb30ffbfa33dcec5778c), 2. [protobuf maven install name](https://github.com/bazel-contrib/rules_jvm_external/issues/916#issuecomment-3045506487), 3. [cross-compile for windows arm64](https://github.com/protocolbuffers/protobuf/commit/37c3384a4fb29de2e9dba6ddb3a50d632b12d23a)) - Removed checked-in grpc rules under third_party and migrated to using the official one. - Re-organized bazel_dep in MODULE.bazel, added `repo_name=None` for in-direct bazel modules. - Updated Maven jar versions. Closes #26477. PiperOrigin-RevId: 781530172 Change-Id: If525fac20b7b74d60b54e490c7bbb892606ca731
-
Googler authored
`linking_context.linkstamps` (`CcLinkingContext.getLinkstamps()`) was deprecated, because it was troublesome to Starlarkify. Remove the implementation and update its test usage RELNOTES[INC]: `linking_context.linkstamps` has been removed. Starlark users should access linkstamp information from a CcInfo provider by iterating through the `linker_inputs` on the `linking_context`. Example: ``` def _get_all_linkstamps(cc_info): """Collects all linkstamps from a CcInfo.""" all_linkstamps = [] for linker_input in cc_info.linking_context.linker_inputs.to_list(): all_linkstamps.extend(linker_input.linkstamps) return all_linkstamps ``` PiperOrigin-RevId: 781526544 Change-Id: I231fd9315d7e3e4a01c16d4d933ebea8393a60f5
-
Fabian Meumertzheim authored
Closes #26507. PiperOrigin-RevId: 781525396 Change-Id: I44b587b510add1e6fa5ca7f64b25a3ab1b5bdf00
-
Googler authored
PiperOrigin-RevId: 781486815 Change-Id: Ic4be48f339f9611fc06faf75456729629f23f048
-
Googler authored
Switch CppLinkstampCompileHelper's call to getCoptsFromOptions() from CcCompilationHelper to CcStaticCompilationHelper - the static method is the same in both classes. PiperOrigin-RevId: 781474558 Change-Id: Ifd74f8b84b8e63864956ac0e866c94cacc460445
-
Googler authored
This change rewrites `LinkerInput` to Starlark, along with its creation method, `CcModule.createLinkerInput`. A new Starlark file, `create_linker_input.bzl`, has been created to house the new `LinkerInputInfo` provider and the `create_linker_input` function. The `cc_common.bzl` file has been updated to point to the new Starlark implementation of `create_linker_input`. The original Java implementation of `createLinkerInput` has been removed from `CcModule.java`, and the corresponding method in the `CcModuleApi.java` interface has been updated with a default implementation that throws an exception, as requested for documentation purposes. There's a slight memory regression that is not easily rectifiable. It's coming from the fact that LinkerInput as a native java object has better memory layout than a Starlark provider, which stores its data in an object array. PiperOrigin-RevId: 781456814 Change-Id: Idb12285e0f076d6cc17da0419c31e5eb2720f6ab
-
Googler authored
We didn't properly transform `DepSpec`s in nodep deps when there are overrides. Fixes https://github.com/bazelbuild/bazel/issues/26495 PiperOrigin-RevId: 781448246 Change-Id: I205eb6c064eb9d0196d9b4861b6c70ac434ed3a4
-
Googler authored
It's unused - we have no more native test rules. PiperOrigin-RevId: 781427426 Change-Id: I8ebba42c65b20c6da7454893bb4bc50eeaa8ccc0
-
Liam Miller-Cushon authored
https://github.com/google/turbine/releases/tag/v0.11.0 ``` REPIN=1 bazelisk run @maven//:pin && bazelisk mod deps --lockfile_mode=update ``` Closes #26514. PiperOrigin-RevId: 781406039 Change-Id: Idd1b176981a4333b724f36b20dfa79775ae147d3
-
Googler authored
... as opposed to crashing, which was the previous state of affairs. Per our documentation - see https://bazel.build/rules/lib/globals/bzl#rule - outputs templates support only strings, labels, outputs, or lists thereof. PiperOrigin-RevId: 781210580 Change-Id: I426d6d452ac1f166515b7d994bed1a2c4b8752e8
-