This project is mirrored from https://github.com/bazelbuild/bazel.git.
Pull mirroring updated .
- May 31, 2024
-
-
Googler authored
https://github.com/bazelbuild/bazel/commit/2a61fe711e297773d0df24b2dfe5ad83d1a24071 attempted this, but the logic was incomplete. The case of skymeld inconsistencies and rewinding ones is more complex because they involve the same SkyKeys (not the case for the heuristic node dropping inconsistencies, which don't touch execution nodes). Observation: the rewinding inconsistency receiver carries out additional actions compared to the Skymeld one, which simply returns if the inconsistency is expected. We should therefore prefer the former when applicable. This CL handles the inconsistencies case-by-base: - RESET_REQUESTED: Can be both. Handle as a Rewinding inconsistency, since it's more comprehensive than Skymeld. - PARENT_FORCE_REBUILD_OF_CHILD: Rewinding only. - BUILDING_PARENT_FOUND_UNDONE_CHILD: Can be both. Try to handle as a Rewinding inconsistency first, then attempt the skymeld route if needed. - ALREADY_DECLARED_CHILD_MISSING: Skymeld only. PiperOrigin-RevId: 636844413 Change-Id: I84adefa519ccb9fa09c079a6c8cec15b14d91e33
-
Googler authored
Doing so results in a race condition: last_message is set when there are no events that are announced but not posted. Progress events always announce the subsequent progress event so if there is a progress event after the build-completing event, last_message is never set. The UI is updated on a separate thread and writing to the console results in a progress event so the above scenario is entirely possible. RELNOTES: None. PiperOrigin-RevId: 636810448 Change-Id: I86e1b9d37b338b3d574a6e27a7d72e81a6ecdffa
-
- May 23, 2024
-
-
Googler authored
This helps to reduce dependency cycles. Work towards composable starlark transitions: #22248. PiperOrigin-RevId: 636260650 Change-Id: I17c0137e9d442fb02cf51e360ede876b4d92f6c4
-
Fabian Meumertzheim authored
Examples: ``` $ bazel build //src:bazel-dev --experimental_remote_cache_evection_retries=5 ERROR: --experimental_remote_cache_evection_retries=5 :: Unrecognized option: --experimental_remote_cache_evection_retries=5 (did you mean '--experimental_remote_cache_eviction_retries'?) $ bazel build //src:bazel-dev --notest_kep_going ERROR: --notest_kep_going :: Unrecognized option: --notest_kep_going (did you mean '--notest_keep_going'?) Closes #22193. PiperOrigin-RevId: 636258381 Change-Id: Ie81344caa14054e1d328d5a6e9b94da506d6a577
-
Fabian Meumertzheim authored
The following validation checks were not enforced due to backwards compatibility concerns, but ended up crashing Bazel when invalid labels made it into the lockfile, which is enabled by default. We might as well enable them now: * Fail if a label passed to `use_extension` is not valid * Fail if a label passed to the `patches` attribute of an override is not valid or points to a repo other than the main repo Work towards #21845 Closes #22487. PiperOrigin-RevId: 636255834 Change-Id: I55dda374cd1716e514c4d78642479b136fd3ad43
-
Googler authored
In preparation for forcing native rules to always return the providers they declare. Since `LateBoundAlias` do not always return `AliasProvider` they can no longer advertise it. Instead a new dummy provider `LateBoundAliasProvider` is created to identify these rules as `maybe` alias rules. Now `LateBoundAlias` should always return `LateBoundAliasProvider`. PiperOrigin-RevId: 636249343 Change-Id: I5c0590d09f8759cf079d9a67628f7d0753bf5519
-
Googler authored
The stack slot calculation is not needed because the COMPUTE_MAXS flag is set on the ClassWriter (passed values are ignored). PiperOrigin-RevId: 636244899 Change-Id: If51599c3cbec0ac95bdedbdac6b87a6472d81128
-
Googler authored
Rollback of https://github.com/bazelbuild/bazel/commit/4d6513b54fa07321115cac350553b29914d43a65 due to user breakage reports. PiperOrigin-RevId: 636212550 Change-Id: Ie880ff94a05a7eb5d4fbb8f8b410ba26e6aa88d1
-
Googler authored
Work towards composable starlark transitions: #22248. PiperOrigin-RevId: 636209749 Change-Id: I9ecdec8b376a9c95b06dea36bacbf9268d0c5195
-
Googler authored
PiperOrigin-RevId: 636196253 Change-Id: I416a1eab42901a2a0d3578e1bc56c1e61158817e
-
Fabian Meumertzheim authored
Work towards #22403 Closes #22497. PiperOrigin-RevId: 636193924 Change-Id: Ia91d249397cd26aed90c6cb5be709a9f29803279
-
- May 22, 2024
-
-
Googler authored
This is required if deserializing NestedSet elements performs Skyframe lookups. PiperOrigin-RevId: 636176654 Change-Id: I9b97d18a0816fc63ed9ed08ebd1863bde1986d9e
-
Googler authored
The retry doesn't work if the ContentLengthMismatchException is wrapped in an IOException. PiperOrigin-RevId: 636107102 Change-Id: I721e0be325dfd7c4e8a3dd697f5d513f42bcb7aa
-
Googler authored
When we're inlining `BZL_LOAD` and `STARLARK_BUILTINS` nodes, cache-and-reuse the single `STARLARK_BUILTINS` node value rather than repeatedly computing it inline. PiperOrigin-RevId: 635950392 Change-Id: If8a132792a6e97c6b3484b295405d59206d1afb1
-
Xdng Yng authored
Closes #22430. Co-authored-by:
hvd <hvadehra@gmail.com> PiperOrigin-RevId: 635920357 Change-Id: I2ce7155ddb8d544f40a1940a1b44dfee8d2af5a7
-
Fabian Meumertzheim authored
JSON-based merge conflict resolution for `MODULE.bazel.lock` can end up producing entries with, e.g., both a `general` and an `os:Linux` factor result when the OS/arch dependence of the extension changes. `BazelLockFileModule` now invalidates each factor result individually. Also sort the extension factors. Closes #22378. PiperOrigin-RevId: 635913837 Change-Id: I0064098806c856f16e8f4c0270f609f06cebc945
-
Googler authored
PiperOrigin-RevId: 635905107 Change-Id: Ic520a4ac424288fbd8b6b39d579fd4eb41e66789
-
Bazel Release System authored
Baseline: 9cf8dc6b Cherry picks: + 8f55a573: Update rules_java 7.6.0 / java_tools 13.6.0 Initial release.
-
UebelAndre authored
closes https://github.com/bazelbuild/bazel/issues/15625 Closes #22458. PiperOrigin-RevId: 635871380 Change-Id: I4acf02558f18e1b9db190113323e57f723ab3ced
-
Fabian Meumertzheim authored
Closes #22409. PiperOrigin-RevId: 635869476 Change-Id: I8992950723b112d8bb8072500840e7a377e5957f
-
Googler authored
*** Reason for rollback *** Broke Bazel postsubmit: https://buildkite.com/bazel/bazel-bazel/builds/28021#018f9a8b-8711-4f02-af8a-c29a1e7c6255 https://github.com/bazelbuild/bazel/pull/22259#issuecomment-2122897663 *** Original change description *** Add layering_check support for macOS There were 2 things with the previous implementation that needed to be improved here: 1. Apple Clang has a bug where it doesn't pass module compiler flags to the underlying -cc1 invocation, so we have to manually pass them directly to that invocation with -Xclang 2. The previous search script was too aggressive and slow for macOS. The macOS SDK has tons of files that aren't headers, and tons of symlin... *** RELNOTES: PiperOrigin-RevId: 635852793 Change-Id: I03b0831706a555bbcf141742aefa3bf48ed0caf3
-
Googler authored
This makes it consistent with how it behaves in memoizing contexts. PiperOrigin-RevId: 635846383 Change-Id: I3649376f4b7e9ed5c2304aa79679ae294a2be79f
-
Googler authored
They weren't used anymore. PiperOrigin-RevId: 635839498 Change-Id: Ic60ec0069ead6738d596064759464fb00abbac42
-
Fabian Meumertzheim authored
Targets tagged with `local` or `no-sandbox` and `no-remote` can't successfully use path mapping and thus have it disabled implicitly. Closes #21921. PiperOrigin-RevId: 635832339 Change-Id: Ib5cac0b202cbcd1704410f06fa3cda645581b849
-
- May 21, 2024
-
-
Googler authored
Switch CredentialHelper to WindowsSubprocessFactory on Windows and increase the stdout/stderr pipe size to 64KB. Fixes #21287 by preventing a deadlock/timeout when a credential helper response is too big, while avoiding more complex solutions for now. 64KB ought to be enough for anybody (TM). PiperOrigin-RevId: 635808494 Change-Id: I29c8d79ae1c92740e7400ba4074c835dcea7de14
-
Googler authored
Remove declared providers from `AndroidResourceSupportRule` as its child `android_binary` does not return them This is in preparation to make native rules always return their declared providers PiperOrigin-RevId: 635795266 Change-Id: I0b526e476da29987cb60ee4a9bf7840cfab825b4
-
Googler authored
Otherwise, a subprocess that consumes the stdin in its entirety can never terminate. PiperOrigin-RevId: 635774207 Change-Id: I134ddd1fee50faccb8ddb8400dbb11ce6a354c05
-
Googler authored
PiperOrigin-RevId: 635750884 Change-Id: Ie5a02fdee7d56adfab9b745e5ff8acff05ad2eea
-
Googler authored
So that the last task won't try to shutdown the remoteCache, otherwise, might cause deadlocks. Fixes https://github.com/bazelbuild/bazel/issues/21568. PiperOrigin-RevId: 635746896 Change-Id: Ic321216dd0bda05ef1ad18367c8ebbcd1a1d272c
-
Keith Smiley authored
Fixes https://github.com/bazelbuild/bazel/issues/14418 Closes #22420. PiperOrigin-RevId: 635740423 Change-Id: Iffd4d172c4175be2e1b6cfad04ddad2759adb987
-
Keith Smiley authored
There were 2 things with the previous implementation that needed to be improved here: 1. Apple Clang has a bug where it doesn't pass module compiler flags to the underlying -cc1 invocation, so we have to manually pass them directly to that invocation with -Xclang 2. The previous search script was too aggressive and slow for macOS. The macOS SDK has tons of files that aren't headers, and tons of symlinks pointing to other files within the SDK. This adds a fork in the script to run a version that works with Apple SDKs. The time difference on my machine is 41s->6s. 6s is still pretty long so if desired we can put this behavior behind an env var for users to opt in with. I've added a hermetic version of this to the apple_support toolchain, but similar to the Linux setup here the modulemap file includes absolute paths. Closes #22259. PiperOrigin-RevId: 635735410 Change-Id: Icb3f30dd7319f147b0db54b3b42d4dc9032dc1a0
-
Googler authored
Basic foundation for limiting strategies used in bazel a la invocation policy. Implemented as an explicit policy for fine-grained control, though for now we just implement an allowlist (in the future it should be extensible enough for more creativity). Naming of the fields in the proto definition is biased towards more ergonomic textproto configuration. Alternatives considered include extending invocation policy to support key/value flags, but this seemed like too much power being added to the flag system for too narrow of a use case. Note that this policy applies universally, regardless of whether or not strategies come by flag or are hard-coded in bazel. This is intentional - it allows *full* control over where/how bazel is executing actions. --strategy_regexp is presently ignored, it requires larger changes to implement, will be done in the next CLs. PiperOrigin-RevId: 635733824 Change-Id: Ic43cf76c2b58b0fcce089119b8ce43a0116c8490
-
Keith Smiley authored
Closes #20084. PiperOrigin-RevId: 635730538 Change-Id: I83a22b0c884d6dc699891f8d71121be80c92c0f1
-
Googler authored
RELNOTES[INC]: The --experimental_aquery_dump_after_build_format and --experimental_aquery_dump_after_build_output_file command line options are not available anymore. PiperOrigin-RevId: 635721237 Change-Id: Ie6c13337bc42e104493637ae8dc6e383165bec2b
-
Googler authored
When the main command thread is interrupted during a build, it may be due to a catastrophic error that happened on another thread. In this scenario we already correctly capture the `DetailedExitCode` in the `BuildResult`, in the `BuildCompleteEvent`. We do not include a `Throwable crash` in this scenario. For the 'test'/'run' commands, the `BuildEventStreamer` was incorrectly ignoring the error details specifically when the OOM error happened on another thread and did not have a `Throwable crash` in its `BuildResult`. A similar bug may exist for non-OOM catastrophic errors. Resolving this is left for a targeted followup. PiperOrigin-RevId: 635654254 Change-Id: Ifdeb0f17463ca6d05d90077fbe6a2045c2a21ab2
-
Fabian Meumertzheim authored
This is a reland of 30b95e33 with a different approach to emitting display form labels that avoids adding a new `to_display_form()` method to `Label`: * In action command lines, which are the most frequent use of labels in rule implementation functions, labels are automatically emitted in display form since 9d3a8b02. * In module extensions and repository rules, if labels can be turned into display form, the inverse of the repository mapping would need to be tracked in lockfiles and marker files for correct incrementality. Furthermore, allowing implementation functions to access apparent names would allow them to "discriminate" against them, thus possibly breaking the user's capability to map repos at will via `use_repo` and `repo_name`. Similar to how providers on a target can't be enumerated, it is thus safer to not provide this information to the implementation functions directly. This change thus implements `StarlarkValue#debugPrint` for `Label` to allow ruleset authors to emit labels in display form in warnings and error messages while ensuring that Starlark logic doesn't have access to this information. `print("My message", label)` degrades gracefully with older Bazel versions (it just prints a canonical label literal) and can thus be adopted immediately without a need for feature detection. This requires changing the signature of `StarlarkValue#debugPrint` to receive the `StarlarkThread` instead of just the `StarlarkSemantics`. Since `debugPrint` is meant for emitting potentially non-deterministic information, it is safe to give it access to `StarlarkThread`. Also improves the Bzlmod cycle reporter so that it prints helpful information on a cycle encountered in a previous iteration of this PR. Fixes #20486 RELNOTES: `Label` instances passed to `print` or `fail` as positional arguments are now formatted with apparent repository names (optimized for human readability). Closes #21963. PiperOrigin-RevId: 635589078 Change-Id: If60fdc632a59f19dad0cb02312690c15a0540c8e
-
Googler authored
Add test to reproduce error when a rule transition reads a configured attribute and the rule was referenced by an output file. PiperOrigin-RevId: 635511847 Change-Id: Iacba4d4065dbb1d089c2d4df3c1c64ae5204fe35
-
Googler authored
Otherwise, anything that depends on `@platform//cpu` will fail. Work towards platform-based flags: #19409. PiperOrigin-RevId: 635502289 Change-Id: I2431a7bc849d2d0b0c6b4573de6a4838ffe9478e
-
Googler authored
PiperOrigin-RevId: 635500424 Change-Id: I841f96c4ef3c23fa97fa3e8bb4d1220b31888652
-
Googler authored
The Bazel client codebase doesn't use absl, but one of the library we use (e.g. gRPC) might. We wouldn't want that to spam the Bazel's user's stderr. Thus, this CL attempts to insulate the client program from that risk. We do this by disabling absl debug logging at the point in the life of the client program where we consider `--client_debug`. This is therefore a non-foolproof approach; consider a library we use that makes debug statements before that point in the life of our program. But we also add an integration test that would catch regressions like this! I noted future improvements in code comments. PiperOrigin-RevId: 635488965 Change-Id: I26d01f9aeda3a237aa68438586f958ae01d5448d
-