This project is mirrored from https://github.com/bazelbuild/bazel.git.
Pull mirroring updated .
- Feb 12, 2025
-
-
bazel.build machine account authored
Users have reported hangs in Bazel's asynchronous remote cache uploads that may be happening because neither `onSuccess` nor `onError` is called on the observer. Work towards #25232 Closes #25231. PiperOrigin-RevId: 725235495 Change-Id: I20c3aaa2ee57a52041dea0b3c17356445f2bbc34 Commit https://github.com/bazelbuild/bazel/commit/d4c9b920b2b5126706645706c5ae282b102e7e23 Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
bazel.build machine account authored
Built-in providers always have an immutable `hashCode`. Making them hashable makes it easier to deduplicate a list of providers, which is sometimes required as the list of provider instances returned by a rule must not contain two instances for a given provider. Starlark-defined providers are already hashable, so this brings the behavior of built-in providers in line with them. Closes #24848. PiperOrigin-RevId: 724370319 Change-Id: I68147b1f707249a8b09ad170c5fc5b3da4776ccf Commit https://github.com/bazelbuild/bazel/commit/c94a9bdbaa389f4ed64d895237d443fcca57e8b4 Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
- Feb 11, 2025
-
-
bazel.build machine account authored
PiperOrigin-RevId: 700351238 Change-Id: If9e0686bee0756b0af56cda91ac70d184858fd72 Commit https://github.com/bazelbuild/bazel/commit/0937e3543ec3fe904361244377baff315adf2091 Co-authored-by:
Googler <trybka@google.com>
-
- Feb 10, 2025
-
-
bazel.build machine account authored
[8.1.0] Fix a bug which makes WorkerPool create too many workers and go above the limitation. (#25240) PiperOrigin-RevId: 725188342 Change-Id: I650741289e906f3d81c95b9956a1fab9603b6ea7 Commit https://github.com/bazelbuild/bazel/commit/815b19d72a8f557f81ff83cdf88fb98d94f7763f Co-authored-by:
Googler <bangbang@google.com>
-
- Feb 07, 2025
-
-
bazel.build machine account authored
Fixes https://bazelbuild.slack.com/archives/CA31HN1T3/p1738763759125489 Closes #25206. PiperOrigin-RevId: 724267755 Change-Id: Ia23bdae310231bd0ee5763311b948f3465aa8ed0 Commit https://github.com/bazelbuild/bazel/commit/ef45e02bfb4af1124bb9ad1ef94f36c70c82ce48 Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
- Feb 06, 2025
-
-
bazel.build machine account authored
Fixes #25192 Closes #25194. PiperOrigin-RevId: 723594158 Change-Id: I12aaced1db4f167c4a9691623128fe0d3eb15686 Commit https://github.com/bazelbuild/bazel/commit/5e2dfbaf7394b099e56d0893b98cef163af87a6b Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
Xùdōng Yáng authored
After https://github.com/bazelbuild/bazel/commit/20c02afe2a7192e8b25dac180451b6ea4fb8c7cf, I _think_ the repo rule docs (e.g. https://bazel.build/versions/7.4.0/rules/lib/repo/http) are the only ones missing the version selectors now. This CL should fix that for nightlies; will send another one to fix the released versions. PiperOrigin-RevId: 721807046 Change-Id: Ib1e5287a0b2d22993a6014130235f32cf268952c
-
- Feb 05, 2025
-
-
bazel.build machine account authored
Built at commit ee12906c Relevant changes: * Add support for input FN lines that include a function end line (#25118). RELNOTES: LCOV parsing does not break on FN lines including an end line number. Closes #25200. PiperOrigin-RevId: 723451534 Change-Id: I8912082ae6517bf0359329004d9a4f5e9ac76188 Commit https://github.com/bazelbuild/bazel/commit/df92905c72607ea369458e4a6af43bb785670528 Co-authored-by:
Charles Mita <cmita@google.com>
-
Fabian Meumertzheim authored
This new attribute contains the original value of the `name` attribute at the instantiation site of the repo rule (e.g., `rctx.original_name` would be `foo` if `rctx.name` is `+ext+foo`). Fixes #24467 Closes #25121. RELNOTES: Added `repository_ctx.original_name`, which contains the original value of the `name` attribute as specified at the repo rule call site. PiperOrigin-RevId: 722731393 Change-Id: I2f7dada0c44b6bd4c0d2622fa1e97223382a8547 (cherry picked from commit 8bcfb06e) Fixes #25147
-
bazel.build machine account authored
Technically strings like "1e2" are not valid for the `time` attribute (that attribute's schema is supposed to be `xs:decimal`), however some JUNIT writers are non-compliant and use scientific e notation and we want Bazel to still work with them. While I'm here, improve the code comments (the existing comment about us having to support values without decimal points like "12" as milliseconds is backwards as noted in https://github.com/bazelbuild/bazel/issues/24605#issuecomment-2524851929) and add tests. Fixes #24605. PiperOrigin-RevId: 722963681 Change-Id: I9383cf7435ae7843f07a5abddbcf790f275403d0 Commit https://github.com/bazelbuild/bazel/commit/f52568f1d5fa15538d2f7c99401417d2cd24679c Co-authored-by:
Googler <nharmata@google.com>
-
bazel.build machine account authored
With `--incompatible_bazel_test_exec_run_under`, the `--run_under` target should be configured for the execution platform of the test action, not the default execution platform of the test rule. This is still not fully correct if `testing.ExecutionInfo` is used to specify an alternative test exec group, but that's a far more difficult change: it would potentially involve a split transition with one configuration for each exec group. Work towards #23179 Closes #25177. PiperOrigin-RevId: 722802891 Change-Id: Ie168bf496d46645f7bd2ad739859504c65286d20 Commit https://github.com/bazelbuild/bazel/commit/e262d021e87727a501ccbdff306d188ed88bcb29 Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
- Feb 04, 2025
-
-
bazel.build machine account authored
Using collection types that aren't guaranteed to preserve insertion order risks errors that differ across machines or builds. Closes #25175. PiperOrigin-RevId: 722768825 Change-Id: Id84c6b5b4bc9a1e6938de727e07c20ee761cbf3d Commit https://github.com/bazelbuild/bazel/commit/2ee6f9232283408442f7a18ab566607e29d96e26 Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
Ian (Hee) Cha authored
Fixes #12318 RELNOTES: The new `no_match_error` attribute on `toolchain_type` can be used to show a custom message when no matching toolchain is found for that type, but one is required. Closes #25134. PiperOrigin-RevId: 722733008 Change-Id: I2ff51f7524325be1b70314bb2db24c829602f5fc Commit https://github.com/bazelbuild/bazel/commit/d514705c1de20b9b6af74d20008e5fc062a18073 Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
bazel.build machine account authored
Fixes #12318 RELNOTES: The new `no_match_error` attribute on `toolchain_type` can be used to show a custom message when no matching toolchain is found for that type, but one is required. Closes #25134. PiperOrigin-RevId: 722733008 Change-Id: I2ff51f7524325be1b70314bb2db24c829602f5fc Commit https://github.com/bazelbuild/bazel/commit/d514705c1de20b9b6af74d20008e5fc062a18073 Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
bazel.build machine account authored
This is a bug fix for the FileNotFoundException introduced by flipping the default value of `incompatible_use_new_cgroup_implementation`. PiperOrigin-RevId: 718390659 Change-Id: Ibad1e7361c9d69b791df9cc058153e942c92f915 Commit https://github.com/bazelbuild/bazel/commit/a87ca4fc42d60b0cc8dd816176ed2b44b8476f53 Co-authored-by:
Googler <bangbang@google.com>
-
- Feb 03, 2025
-
-
bazel.build machine account authored
Nit: Add `cd -` to return back to `$OLDPWD` after following the suggestion to install the required Bazel version. That way developers don't have to cd back to their project Closes #24995. PiperOrigin-RevId: 718263777 Change-Id: I5133db65dc2b9032a9e631c62966314f3cfb4593 Commit https://github.com/bazelbuild/bazel/commit/d6501217c3418e62198250ccb25a1d450dff3ced Co-authored-by:
sarad <sarad.pant@capitalone.com>
-
bazel.build machine account authored
[8.1.0] Rollforward of https://github.com/bazelbuild/bazel/commit/7f6e6496726aad4038368979c772e944bc323b7f: Add support for path mapping to `CppArchive` (#25162) This mostly requires wiring up the existing machinery for structured variables and (most) link build variables. Utility methods on `PathMappers` are moved to `PathMapper` so that they can be dependend on by `AbstractCommandLine` without creating a cycle. NEW: - Allow toolchain variables to be None and skip them in that case, matching the previous behavior. - Use the effective output paths mode for fingerprinting to preserve action cache entries for non-path mapped actions even when path mapping is generally enabled. Closes #25154. PiperOrigin-RevId: 721850758 Change-Id: I34a66006ba4c8fd73d62ce8cea249577f62a1b02 Commit https://github.com/bazelbuild/bazel/commit/08f0709dc55af867ee7f6444285bcde7947b3da4 --------- Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im> Co-authored-by:
iancha1992 <heec@google.com>
-
bazel.build machine account authored
Simplifies `print` style debugging. Closes #24156. PiperOrigin-RevId: 721850583 Change-Id: I8b3c3a1063f1dbfa3c0c1556e1112c1885a5c6a9 Commit https://github.com/bazelbuild/bazel/commit/fe7b4abe4d9f20a1c5d4807f7bb737fbbe7fb14d Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
- Feb 01, 2025
-
-
Fabian Meumertzheim authored
If enabled (or set to `error`), fail if Starlark files are not UTF-8 encoded. If set to `warning` (the default), emits a warning instead. Bazel already assumes that Starlark files are UTF-8 encoded for e.g. filenames in actions executed remotely. This flag doesn't affect this, it only makes encoding failures more visible. Work towards #374 Closes #24944. PiperOrigin-RevId: 721513249 Change-Id: I1d3363168c6cd5d37abf96e0401e34866b6679d7 (cherry picked from commit e7934ce9) Fixes #25148
-
- Jan 31, 2025
-
-
Yun Peng authored
Reverts bazelbuild/bazel#25146 Due to https://github.com/bazelbuild/bazel/pull/25081#issuecomment-2626873777
-
bazel.build machine account authored
This mostly requires wiring up the existing machinery for structured variables and (most) link build variables. Utility methods on `PathMappers` are moved to `PathMapper` so that they can be dependend on by `AbstractCommandLine` without creating a cycle. Work towards https://github.com/bazelbuild/bazel/discussions/22658#discussioncomment-11966720 Work towards #6526 Closes #25081. PiperOrigin-RevId: 721499678 Change-Id: I4551f268093c7b851791a41deb57292b2c23afb7 Commit https://github.com/bazelbuild/bazel/commit/7f6e6496726aad4038368979c772e944bc323b7f Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
- Jan 30, 2025
-
-
bazel.build machine account authored
Fixes #24827 Closes #25087. PiperOrigin-RevId: 721285704 Change-Id: Id5c1a8b699f7c5bca1995dba7a8c871805b1a598 Commit https://github.com/bazelbuild/bazel/commit/f64f3605226e380d322f8cf503b014c05747f990 Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
Ian (Hee) Cha authored
This makes it easier to tell whether a given spawn ran remotely or sandboxed, which is especially important for test actions (which run multiple spawns). Closes #24987. PiperOrigin-RevId: 718862807 Change-Id: Ib88102c06d4641fed717b809eaee4e9485853452 Commit https://github.com/bazelbuild/bazel/commit/60fb7a4733d7d7582b77600396c3e50d686cf36f Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
Alexandre Rostovtsev authored
The Starlark interpreter, for optimization reasons, stores the bindings of comprehension variables in their enclosing function's locals array. This means we cannot naively transform the locals array into a name -> value map for debugger output: there may be multiple initialized variables having the same name. And since we have been building this map using buildOrThrow(), attempting to debug a function with a comprehension variable having the same name as a parameter or other local variable would crash Bazel. The immediate fix would be to track comprehension bindings' lexical scope (by saving a pointer to the comprehension AST node; note that a comprehension's scope has a non-trivial shape - it has a "hole" punched out for the first `for` clause), so we can ignore comprehension variables outside their comprehension, and emit only the innermost one when inside a comprehension (relying on the fact that the resolver places inner comprehensions' variable bindings after the outer ones). However, while this fixes the crash and the most obvious correctness problem, it does not allow the user of the debugger to examine the value of the shadowed variables. The proper fix - to be implemented later - would be to push a new debugger frame when debugging inside a comprehension. See https://github.com/bazelbuild/bazel/issues/24931 and discussion with @fmeum in https://github.com/bazelbuild/bazel/pull/24919 PiperOrigin-RevId: 715908968 Change-Id: I3066e89f2e92d0fd0e483851a767b7c7d70ab555 Cherry pick of https://github.com/bazelbuild/bazel/commit/29bdfa392bf8a551d0fad5cee4e425e042194bf0
-
bazel.build machine account authored
Previously this only applied if you did `bazel run` without `--script_path`. Closes #25060. PiperOrigin-RevId: 720874776 Change-Id: Ib118fe970cac94e87ace9ac870b2b70d7b65bbc0 Commit https://github.com/bazelbuild/bazel/commit/b3a04919a2112460afe7485e71bc343d3b7bdd1c Co-authored-by:
Keith Smiley <keithbsmiley@gmail.com>
-
bazel.build machine account authored
…behavior. Context: https://github.com/bazelbuild/bazel/issues/23003 Technical notes: This involves a lot of subtle interactions between the concepts of platform skipping, `config_setting`, `label_flag`, and aliases. This fixes the problem where a `config_setting` keyed on a `label_flag` that references an incompatible target gave the error "not a valid key for the `config_setting"`. The reason is that `config_setting` expects all `flag_values` keys to expose `BuildSettingProvider`. But an incompatible target (whether directly or because one of its deps is incompatible) is a `RuleConfiguredTarget` that only exposes `IncompatiblePlatformProvider`. I fixed this by exempting `label_flag` from being marked incompatible due to incompatible deps. It therefore returns its normal value, which is a specially created `AliasConfiguredTarget` that adds the right `BuildSettingProvider` via `AliasConfiguredTarget.overrides`. All well and good. But if you build such a `label_flag directly`, Bazel still returns an error that it's incompatible due to incompatible deps. That's great, and accurate. But why does it do that if we exempted it from being incompatible in that situation? The reason is that, as an `AliasConfiguredTarget`, it forwards its dependencies' provider. Since its dependency has `IncompatiblePlatformProvider`, that gets forwarded implicitly, so the routine "is the top-level target incompatible?" check still triggers on the `label_flag` the build requested. That's a bit odd: the `label_flag` both is and isn't indirectly incompatible depending on which logic is checking. But there's no easy way around this: `ConfigSetting` *has* to consider it compatible to avoid it being a special `RuleConfiguredTarget` with `IncompatiblePlatformProvider`. But since i's normal form is an alias that auto-triggers the "forward my incompatible deps" logic Point is this is all a bit subtle. I vetted reasonable behavior as best I can, but I'm not 100% confident we capture every corner case correctly or intuitively. There's just too much subtle interplay between various delicate parts of the build API. You could just as well argue, for example, that `$ bazel build //my:label_flag` should *never* produce an incompatibility error since label flags are dependency aliases, and not meant to build anything directly. If you wanted that behavior just use a plain `alias`. But I don't want to scope-creep this fix so I'll just note these API ambiguities and leave this PR's ambition as-is. Relatedly you'll see I updated a few pieces of "foo was skipped" reporting messages to reflect that `label_flag` is an alias. Note that change *cannot* kick in for requested builds incompatible `alias` targets. Those are properly considered incompatible, which means they get replaced with `RuleConfiguredTarget` with an `IncompatiblePlatformProvider`. So those essentially cease to be aliases for top-level "foo was skipped"-style reporting. See the test methods I added for specific expectations I encoded. We should also update the `config_setting` documentation on `label_flag` and `alias` interaction. Fixes https://github.com/bazelbuild/bazel/issues/23003. PiperOrigin-RevId: 702118583 Change-Id: Ia6e80af57cc3b4e6d2574bf28a1d8fe0dbff0852 Closes #24542. Change-Id: Ia6e80af57cc3b4e6d2574bf28a1d8fe0dbff0852 PiperOrigin-RevId: 702478496 Commit https://github.com/bazelbuild/bazel/commit/916e8581bb2861838fbec0cb6e9228caac7efddc Co-authored-by:
Googler <gregce@google.com>
-
bazel.build machine account authored
This makes `exec_properties` such as `no-remote-exec` effective for the main test spawn, where they previously only affected post-processing spawns such as test XML generation. Pros: * relatively simple (and more precise than `tags`) way to affect test execution using existing API * provides consistency between test spawns * provides consistency between test spawns and spawns produced by Starlark actions Cons: * similar to Starlark actions, execution info is "polluted" with `exec_properties` such as `OSFamily` and `container-image`, which shows up in `aquery` and may increase memory usage * the fact that `exec_properties` end up in execution info appears to have been an unintentional side effect of https://github.com/bazelbuild/bazel/commit/adb56ccd811b60db5dc05c5434cd7c436a6cb81b rather than a conscious design decision * provides functionality may be better addressed by [Execution Platform Scoped Spawn Strategies](https://github.com/bazelbuild/proposals/blob/main/designs/2023-06-04-exec-platform-scoped-spawn-strategies.md) Closes #24979. PiperOrigin-RevId: 721088264 Change-Id: I7ce5c899ed6a647831f156f6b34c1f776655425c Commit https://github.com/bazelbuild/bazel/commit/357b091dc7afa9f40c78acca0c53e63ea0b20c8b Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
Tiago Quelhas authored
PiperOrigin-RevId: 720535693 Change-Id: I2467ab2d2426b44382904d50b58edc7602ee457e
-
Chi Wang authored
... if the corresponding output is materialized afterwards and hasn't been changed. Failing to do so will cause an incremental build to re-check the action cache for actions whose outputs were materialized during last build. This can be very slow if the size of the outputs are large. We achieved this by storing `FileContentsProxy` in the remote metadata after materialization. During dirtiness check, we compare remote metadata and the corresponding local metadata with their `digest`, or `proxy` if `digest` is not available for local metadata, A user reported back the wall time of their very first increment build is improved by this change from `14s` to less than `1s` in common case, and from `115s` to less than `1s` in worst case. https://github.com/bazelbuild/bazel/issues/24763 PiperOrigin-RevId: 715734718 Change-Id: Id1a1a59d8b5f3e91a7ae05a73663ff37eee6d163 Fixes #24940.
-
- Jan 29, 2025
-
-
bazel.build machine account authored
The mapping of an apparent name in a module extension tag's `attr.label` attribute to the corresponding canonical name has to be recorded in the lockfile so that instantiated repo rules don't reference the stale repos. Fixes #25063 Closes #25067. PiperOrigin-RevId: 720592796 Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb Commit https://github.com/bazelbuild/bazel/commit/59cb6fe990933eb764fd22ef3115c0d7f51baded Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
Tiago Quelhas authored
The `--experimental_install_base_gc_max_age` flag determines the criteria for considering an install base stale; zero disables garbage collection. The default will be replaced with a suitable nonzero value in a future CL. Progress on #2109. PiperOrigin-RevId: 705874241 Change-Id: I3c8526a4a0e20a12d52c08cb282f24e268cbc633
-
bazel.build machine account authored
Before we completely deprecate the old worker pool, we should flip this to `true` and wait for a grace period. PiperOrigin-RevId: 694418770 Change-Id: I5d6eb2159f3028aa17cf56fd9dfe85ecf63bc775 Commit https://github.com/bazelbuild/bazel/commit/b8e96e565ba1ff9b640ae2b152d6034af1db0bf2 Co-authored-by:
Googler <bangbang@google.com>
-
Tiago Quelhas authored
PiperOrigin-RevId: 705040576 Change-Id: I3c912c1d268c6600c873e2e89d3e09b7173e80fa
-
Fabian Meumertzheim authored
Closes #24394. PiperOrigin-RevId: 701013207 Change-Id: Ie530ce00093acff23cc66c14ad6bbe908ca024ab (cherry picked from commit a4eadbea) Fixes #24642
-
Alexandre Rostovtsev authored
Cherry-pick of the following 2 commits: 1. Add set data type to Starlark Experimental feature guarded by --experimental_enable_starlark_set. This is the Bazel implementation of https://github.com/bazelbuild/starlark/issues/264 Replicates the Python 3 set API and (in almost all respects) the starlark-go implementation, with the notable exception of explicitly not supporting (partial) ordering of sets. Note that there are no set-valued attributes (nor plans to add any), and set-valued select() expressions are not supported. RELNOTES: Add a set data type to Starlark, guarded by the --experimental_enable_starlark_set flag. PiperOrigin-RevId: 695886977 Change-Id: Id1e178bd3dd354619f188c4375d8a1256bd55f75 Cherry-picked from https://github.com/bazelbuild/bazel/commit/c5e08d4de65167e91045d99e89dc4b6a17e9fb39 2. Enable Starlark sets by default Now that the Starlark language spec has been approved: https://github.com/bazelbuild/starlark/blob/master/spec.md#sets Require elements of arguments to StarlarkSet methods to be hashable, matching the final version of the language spec. Take the opportunity to update our documentation to match the spec whenever reasonable (modulo minor differences in terminology and formatting). RELNOTES: Flip --experimental_enable_starlark_set and enable the Starlark set data type by default. PiperOrigin-RevId: 707659085 Change-Id: Ibcad59838f9709e980d7b69f4957b8f0fede51c6 Cherry-picked from https://github.com/bazelbuild/bazel/commit/8ae25701a32668bf98d526426aa849ea02149833
-
- Jan 28, 2025
-
-
Fabian Meumertzheim authored
Work towards #23243 Closes #24857. PiperOrigin-RevId: 719146087 Change-Id: I03b1bfa4770fceca4c6eef1675094d39d7fee02e (cherry picked from commit 1b410631) Fixes #24862
-
bazel.build machine account authored
Closes #21118. PiperOrigin-RevId: 720542437 Change-Id: I2ff251c72db1fcce206099f9e950662ba575f74e Commit https://github.com/bazelbuild/bazel/commit/152d5e756241dbcc563eef05bfae45ae99e3d36a Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
Tiago Quelhas authored
Work towards #374 Closes #24935. PiperOrigin-RevId: 718549143 Change-Id: Ibe6c685a2f8dd75430cae7f770d392de35bdeb68 Co-authored-by:
Fabian Meumertzheim <fabian@meumertzhe.im>
-
Tiago Quelhas authored
This requires fixing preexisting test cases that weren't actually passing. PiperOrigin-RevId: 705082633 Change-Id: Ia00a30d0c8fc758148446029f635b2863d4a76e2
-
Tiago Quelhas authored
[8.1.0] Fix forward for breakage caused by https://github.com/bazelbuild/bazel/commit/3dcb585fb2f24c75d472df286ccd2891ff7f39b0. (#25095) The --lock_install_base startup flag must default to false, so that the client can obtain the desired behavior by either explicitly enabling or omitting it (explicitly disabling is problematic). PiperOrigin-RevId: 704347325 Change-Id: I55b9b324c2c16035356673291c254e6629105d8e
-