Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/bazelbuild/bazel.git. Pull mirroring updated .
  1. Jul 28, 2023
  2. Jul 08, 2023
    • Googler's avatar
      Makes error message for expected package group consistent. · 7845acae
      Googler authored
      This is "Label" in both ConfiguredTargetFactory and DependencyResolver.
      
      PiperOrigin-RevId: 546372326
      Change-Id: I74a7e774f3e9b07b45e20a1f5cc8920d80ada3bc
      7845acae
    • Googler's avatar
      Skips delegating nodes in AnalysisTestCase.getSkyframeEvaluatedTargetKeys. · 6e660f46
      Googler authored
      Delegating configured target nodes do not create configured targets directly
      and make these tests more brittle than necessary.
      
      PiperOrigin-RevId: 546371644
      Change-Id: I898d69fcbabec21b13553c13cbc49e523ecf5504
      6e660f46
    • Googler's avatar
      Automatic code cleanup. · d052d6bf
      Googler authored
      PiperOrigin-RevId: 546348221
      Change-Id: I4237cd6439ab227ee74bd8b7e3aa29f4abc5ec7f
      d052d6bf
    • Googler's avatar
      Open-source Google test `ConvenienceSymlinkTest` · 8781e5ce
      Googler authored
      In support of https://github.com/bazelbuild/bazel/pull/18854.
      
      PiperOrigin-RevId: 546346128
      Change-Id: Ie3f6976b74cba351573a7f35b0d09391da10fb55
      8781e5ce
    • Googler's avatar
      Support passing LLVM MemProf (memory profile) to CppCompile · 617a3bd0
      Googler authored
      Adds support for supplying a MemProf profile, which can be supplied to LLVM to
      automatically hint allocations based on profiled memory behavior. The patch
      adds Blaze flag --memprof_profile=<label>, along with a memprof_profile rule
      that allows specifying a profile either by absolute path or label.
      
      The profile can either be an LLVM memprof profile with a .profdata extension,
      or a zipfile containing one. The profile is symlinked and optionally unzipped,
      and set in the memprof_profile_path build variable, which can be used to pass
      the profile to the compiler via a feature.
      
      PiperOrigin-RevId: 546311130
      Change-Id: I896898bf3bddcf42214cde3f3f27d2ed18de6b26
      617a3bd0
  3. Jul 07, 2023
    • Googler's avatar
      Move test helper `assertIsSubsetOf` to `FileSystemValueCheckerInferringAncestorsTestBase` · 772cddee
      Googler authored
      PiperOrigin-RevId: 546280755
      Change-Id: Ie2c79d34e1f94a003c4caf6d32f79be9a54101cc
      772cddee
    • Googler's avatar
      Introduce a `LazyImmutableStarlarkList`, used for lazily flattening depsets... · 6ae9503c
      Googler authored
      Introduce a `LazyImmutableStarlarkList`, used for lazily flattening depsets when they are requested from `ctx.files`.
      
      An abstract `ImmutableStarlarkList` class is extracted to share among the three immutable implementations.
      
      `ctx.files.x` returns a list of transitive files provided by prerequisites in attribute `x`. The list is eagerly constructed when creating the `ctx` object prior to invoking the rule or aspect implementation function. This can be slow when the `FileProvider` (`DefaultInfo.files`) contains many transitive members.
      
      Lazily flattening is especially effective in the deeply nested case because users are likely to opt for the depset-based API of `ctx.attr.x.files` anyway, leaving the flattened lists unused.
      
      Additionally, this saves a small bit of memory by not allocating `NestedSet` memos.
      
      It remains up for debate whether `ctx.files.x` should be deprecated in favor of accessing depsets through `ctx.attr.x.files`, but this change has pretty significant performance benefit with no need for migrations, so I think it's worth making.
      
      PiperOrigin-RevId: 546277754
      Change-Id: Ie58277f198665c53b0dc63f7830989402e899905
      6ae9503c
    • Googler's avatar
      Move `--collapse_duplicate_defines` to the graveyard. · 68a47806
      Googler authored
      It has been enabled for quite a while and there is no reason to disable it.
      
      PiperOrigin-RevId: 546235453
      Change-Id: I897056960da937b7f43e1a3b6265fcd537076182
      68a47806
    • Googler's avatar
      Implement `java_common.java_toolchain_label` in Starlark and delete corresponding native code · 59a16134
      Googler authored
      As an aside, the java toolchain label has been freely visible in Starlark some time now, so this method has little to no utility. Will clean up usages and delete in the future.
      
      PiperOrigin-RevId: 546228890
      Change-Id: I659ecfa6244c53e9dffe035f155f64893f9e763a
      59a16134
    • Fabian Meumertzheim's avatar
      Update grpc to 1.48.1.bcr.1 and remove temporary rules_go dep · 9631f419
      Fabian Meumertzheim authored
      `grpc` 1.48.1.bcr.1 no longer depends on a yanked version of `rules_go`, which means that the temporary direct dependency on `rules_go` introduced by 6c393ec5 is no longer needed.
      
      Closes #18857.
      
      PiperOrigin-RevId: 546228207
      Change-Id: Ie7045feb6d155045f127bf7014e4512072f0cae2
      9631f419
    • Googler's avatar
      Revert "Implement `java_common.to_java_binary_info` in Starlark and delete... · 9819a402
      Googler authored
      Revert "Implement `java_common.to_java_binary_info` in Starlark and delete corresponding native code"
      
      PiperOrigin-RevId: 546222038
      Change-Id: I50032e2f509a6c630c9a29d33834e3bb137b4e29
      9819a402
    • Googler's avatar
      Fix race condition for tests with `--experimental_cancel_concurrent_tests`. · e064f8ff
      Googler authored
      When `--experimental_cancel_concurrent_tests` is set, Bazel will cancel concurrently running tests on the first successful run by interrupting threads these tests running on.
      
      Normally, if the test runner hasn't started running the test, or is waiting for the test to finish, the interruption can cancel that blocking operation and clear the interrupted status of the thread.
      
      However, current code doesn't handle the case when the tests to be cancelled are already finished which leads to two problems:
        1. The interrupted status is propagated to skyframe causing the entire invocation to be cancelled.
        2. The assumption that "no test log is generated if the test was cancelled" is no longer true.
      
      This CL fixes that by:
        1. Inside `AttemptGroup#cancelOthers`, we only cancel others if this group hasn't been cancelled to prevent the winning thread got cancelled by other threads that are already finished when receiveing the interruption.
        2. Check thread's interrupted status after the test attempt is finished.
        3. Remove the assertion that "no test log is generated if the test was cancelled".
      
      PiperOrigin-RevId: 546214028
      Change-Id: I3fc8d4e446ccabdb4c7b1794a3aeb8052912a044
      e064f8ff
    • Googler's avatar
      Fix `to_java_binary_info`, for real this time · 07c6a1c6
      Googler authored
      We should check for a non-`None` `java_.info.compilation_info` since the field is always present.
      
      PiperOrigin-RevId: 546203630
      Change-Id: I6a60e3860e10933b10a4ad22be3f0c89605d4050
      07c6a1c6
    • salma-samy's avatar
      handle exception instead of crashing · fcfefc15
      salma-samy authored
      Fixes: https://github.com/bazelbuild/bazel/issues/18641
      
      PiperOrigin-RevId: 546092727
      Change-Id: I66365813a40390ec61a1a0565b06655b3ca50fcd
      fcfefc15
    • salma-samy's avatar
      Add lockfile documentation · fb1c344e
      salma-samy authored
      PiperOrigin-RevId: 546085523
      Change-Id: If287e6e143f8858d185f83a1630275520db65e44
      fb1c344e
    • Googler's avatar
      Inline the only usage of and delete `JavaCommon.collectNativeLibraries` · 27d158b3
      Googler authored
      Also avoids creating a potentially large list of artifacts by computing the set of directories in the same stream that filters for shared libraries[^1]
      
      PiperOrigin-RevId: 546081142
      Change-Id: I613df2d0e5b47deae12e0f771b6b96e8d950d539
      27d158b3
    • Googler's avatar
      Teach DexMapper to not separate synthetic classes from their context classes... · 3e800a7d
      Googler authored
      Teach DexMapper to not separate synthetic classes from their context classes when sharding dexes, like DexFileSplitter in https://github.com/bazelbuild/bazel/commit/9092303c358b87c1e027abafe135c44a27531b36. Fixes #16368
      
      RELNOTES: None
      PiperOrigin-RevId: 546041575
      Change-Id: I12fa8cff15b13534ca9a5682b7e9b43e6c860ef8
      3e800a7d
    • George Gensure's avatar
      Avoid discarding SRE state for IO cause · 6f737d4d
      George Gensure authored
      Unwrapping all StatusRuntimeExceptions in in ReferenceCountedChannel when caused by IOException will discard critical tracing and retriability. The Retrier evaluations may not see an SRE in the causal chain, and presume it is invariably an unretriable exception. In general, IOExceptions as SRE wrappers are unsuitable containers and are routinely misued either for identification (grpc aware status), or capture (handleInitError).
      
      Partially addresses #18764 (retries will occur with SSL handshake timeout, but the actual connection will not be retried)
      
      Closes #18836.
      
      PiperOrigin-RevId: 546037698
      Change-Id: I7f6efcb857c557aa97ad3df085fc032c8538eb9a
      6f737d4d
    • Emil Kattainen's avatar
      Fix remote action wall time in the case of action timeout · 70e66eb0
      Emil Kattainen authored
      Closes #18843.
      
      Change-Id: Ifa07522df85cbbb39193e60e87de525efc51f492
      PiperOrigin-RevId: 546031541
      70e66eb0
    • Googler's avatar
      Move `merge` from `java_common_internal_for_builtins.bzl` to `java_info.bzl` · c231b7d3
      Googler authored
      Just a refactoring change that is a no-op. Split off from the change that implements `merge` in Starlark for easier review.
      
      PiperOrigin-RevId: 546020116
      Change-Id: I3dad53ceac43a7d241e2a772cfcf97d59cf73a08
      c231b7d3
  4. Jul 06, 2023