Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/bazelbuild/bazel.git. Pull mirroring updated .
  1. Apr 21, 2020
    • Bazel Release System's avatar
      Release 3.1.0 (2020-04-21) · 4827fc67
      Bazel Release System authored
      Baseline: 17ebbf15
      
      Cherry picks:
      
         + 71fb56b4:
           Suppress last-ditch download exceptions w/cleanup
         + fd60614c:
           In repo rules, don't warn about generator_* attributes being
           non-canonical
         + 2a372792:
           Refactor configureFeatures and prevent NPE
         + 777a6ee6:
           Automated rollback of commit
           0bbe3817.
         + 2ee53c92:
           Guard parseActionResultMetadata with bulk wrapper
      
      Incompatible changes:
      
        - The deprecated startup options
          --experimental_oom_more_eagerly(_threshold) are removed.
      
      Important changes:
      
        - Remove flag
          --incompatible_load_proto_toolchain_for_javalite_from_com_google_p
          rotobuf which has been flipped in Bazel 3.0.
        - Allow assembly file sources in cc_common.compile.
        - Set default .netrc file on Windows to %USERPROFILE%
        - A maximum 150 attributes per RuleClass is enforced
        - Increase max targets per rule class limit to 200
        - ctx.split_attr now includes attributes with Starlark split
          transitions.
        - The --max_computation_steps flag bounds the computation done by a
          BUILD file.
        - Native patch can handle file permission properly
        - Aspects may now propagate through dependencies on rule outputs by
          being defined with `apply_to_generating_rules = True`.
        - 'query --output=build' now shows where rule classes (not just
          rules) are created.
        - The flag `incompatible_bzl_disallow_load_after_statement` is
          removed.
        - ctx.split_attr now includes attributes with Starlark split
          transitions.
        - The flag `incompatible_no_output_attr_default` is removed.
        - Fix wall-time of the SpawnResult in WorkerSpawnRunner
        - Add stamp parameter for cc_common.link to enable including build
          info
        - The flag `--incompatible_restrict_named_params` is removed.
        - The flag `--incompatible_depset_union` is removed.
        - Bazel uses fewer compiler flags by default when building
          Objective-C. In
          particular, Bazel no longer sets `-O0`, `-DDEBUG=1`,
          `-fstack-protector`, `-fstack-protector-all`, or `-g` in dbg
          mode, and
          Bazel no longer sets `-Os`, `-DNDEBUG=1`, `-Wno-unused-variable`,
          `-Winit-self`, or `-Wno-extra` in opt mode. If you want to apply
          these
          flags to your project, you can reenable them in your CROSSTOOL.
        - A maximum attribute name length is 128 is enforced
      
      This release contains contributions from many people at Google, as well as Alessandro Patti, Benjamin Peterson, Benjamin Romano, Bor Kae Hwang, Chris Heisterkamp, Cristian Hancila, Dmitri G, Douglas Parker, George Gensure, Gregor Jasny, John Millikin, Keith Smiley, Leo, Mike Fourie, Patrick Balestra, Robbert Van Ginkel, Ryota, Samuel Giddins, Ulf Adams, Ulf Adams, Vertexwahn, Xavier Bonaventura, Yannic Bonenberger.
      3.1.0
      4827fc67
  2. Apr 17, 2020
    • George Gensure's avatar
      Guard parseActionResultMetadata with bulk wrapper · 2ee53c92
      George Gensure authored
      ActionResult Orphaned Output Directories must be wrapped in
      BulkTransferExceptions in order to be eligible for re-execution. This
      change prevents an unavoidable build failure introduced with #10029 in
      the event that an output directory tree specified in an action result
      is missing from the CAS, and adds testing that would detect such a
      regression.
      
      Closes #11140.
      
      PiperOrigin-RevId: 307027914
      2ee53c92
    • arostovtsev's avatar
      Automated rollback of commit 0bbe3817. · 777a6ee6
      arostovtsev authored
      *** Reason for rollback ***
      
      Breaks our Swift builds - getting a bunch of "use of unresolved identifier" errors.
      
      PiperOrigin-RevId: 306233857
      777a6ee6
    • George Gensure's avatar
      Refactor configureFeatures and prevent NPE · 2a372792
      George Gensure authored
      Organize this method into blocks for ruleContext nullness, and prevent a
      NullPointerException observed in #11114 in validateLayeringCheckFeatures
      parameters.
      
      Closes #11115.
      
      PiperOrigin-RevId: 306628913
      2a372792
    • Jon Brandvein's avatar
      In repo rules, don't warn about generator_* attributes being non-canonical · fd60614c
      Jon Brandvein authored
      A recent change added the implicit generator_* attributes ("generator_name",
      "generator_function", and possibly "generator_location") to all repo rules.
      This had the unfortunate side-effect of spamming all users of certain repo
      rules with a warning that the values for these attributes are non-canonical.
      
      Since these attributes are implicitly created and supplied by Bazel itself,
      and since they do not (or should not) affect repo rule determinism, there is
      no action needed on the part of the user. This change hardcodes them to be
      excluded from the canonical warning.
      
      Fixes #11040. Closes #11113.
      
      PiperOrigin-RevId: 306478566
      fd60614c
    • George Gensure's avatar
      Suppress last-ditch download exceptions w/cleanup · 71fb56b4
      George Gensure authored
      Create an encapsulating DownloadException to represent the aggregate
      exception set of an ActionResult download. IOExceptions will be retained
      through exception suppression, and the outer exception has a property to
      indicate if it only represents a sequence of CacheNotFoundExceptions.
      
      InterruptedExceptions interception is improved to cancel pending work
      and wrap, through suppression, any DownloadException that also occurred
      during the download. InterruptedException being thrown on the download
      control thread, it does not require suppression of further interrupts,
      and can represent an outer download exception. Thread interrupt status
      is suppressed for cancellations, and conveyed on throw.
      
      These exception wrapping efforts allow non-asynchronous frame
      representation in stack traces, and much clearer identification of
      sources within remote strategy execution which produce failures based on
      remote errors.
      
      Any DownloadException in the last-ditch output download under
      handleError in RemoteSpawnRunner is added as suppressed to the
      initiating exception. Other exceptions (likely local IO) present clear
      immediate traces and do not require specialized treatment.
      
      Closes #10029.
      
      PiperOrigin-RevId: 306619678
      71fb56b4
  3. Apr 07, 2020
    • ajurkowski's avatar
      Add a marker interface for NodeEntries wrapped by NotifyingHelper. · 17ebbf15
      ajurkowski authored
      Add a marker interface to identify NodeEntries created by tests. Mark NodeEntry
      wrappers created by NotifyingHelper with the new interface.
      
      PiperOrigin-RevId: 305147884
      17ebbf15
    • Googler's avatar
      Reroot Desugar Adapter/Converter Classes to at Top Level · 63de5329
      Googler authored
      #desugar #new-android-api-support #desugar-shadowed-api
      
      - In align with the strict version of[]
      
      PiperOrigin-RevId: 305143558
      63de5329
    • Googler's avatar
      Cleanup explict Desugar Type Adapter Classes. · beef655c
      Googler authored
      #desugar #new-android-api-support #desugar-shadowed-api
      
      - The desugar tool auto-generates these classes instead.
      
      PiperOrigin-RevId: 305139712
      beef655c
    • Googler's avatar
      Migrate ReverseConsumerWrapper Usage to ConsumerConverter in Type Adapter library · 7575412e
      Googler authored
      #desugar #new-android-api-support #desugar-shadowed-api
      
      - Removes the use of --from_core_library_conversion flag.
      - As a prerequisite to remove :conversion_helpers target in Child CL.
      
      PiperOrigin-RevId: 305136542
      7575412e
    • Googler's avatar
      Redirect all Remaining Invocations to Desugar-Shadowed Android APIs to use... · 97e4b499
      Googler authored
      Redirect all Remaining Invocations to Desugar-Shadowed Android APIs to use Automatic-generated the Adapters
      
      #desugar #new-android-api-support #desugar-shadowed-api
      
      - This CL only makes invocation redirection.
      - The existing manual adapters code is kept in CL and to be cleaned up in child CLs due to other dependencies and limit the CL scope.
      - The command-line flags are to be cleaned up after this CL sequence, as flags don't have static code traction and entices more thorough auditing.
      
      PiperOrigin-RevId: 305136052
      97e4b499
    • jcater's avatar
      OutputDirectoryLinksUtils should us its own logger. · b7315d80
      jcater authored
      PiperOrigin-RevId: 305130028
      b7315d80
    • nharmata's avatar
      Remove support for inlining SkylarkImportLookupValue in analysis-phase Skyframe · dd21a93c
      nharmata authored
      node computations.
      
      This code has always been dead in Bazel and recently became dead in Blaze. We still need to keep around the support for inlining SkylarkImportLookupValue in loading phase nodes. I went ahead and renamed the methods/variables suggestively. There are probably a few more simplifications I could do, but I tried to keep this change here small; someone else is free to do those later.
      
      RELNOTES: None
      PiperOrigin-RevId: 305127325
      dd21a93c
    • jcater's avatar
      Move DuplicateException to its own class. · 84ca5560
      jcater authored
      This breaks a dependency cycle between OutputGroupInfo and MergedConfiguredTarget.
      
      PiperOrigin-RevId: 305119616
      84ca5560
    • brandjon's avatar
      Rewrite TODOs to use internal bug id · 97f9a93a
      brandjon authored
      Issue #7010 has long been closed in OSS Bazel, but its Google-internal equivalent remains open, pending a cleanup of the depot.
      
      RELNOTES: None
      PiperOrigin-RevId: 305103124
      97f9a93a
    • michajlo's avatar
      Ensure attribute name lengths are reasonable · 0a89cef0
      michajlo authored
      Puts a sensible, but generous, bound on attribute name length in order to
      prevent (most probably accidental) runaway name lengths. The expectation is
      that no reasonable human is or should be typing out 128 char attribute
      names. Instead anything getting to this length is likely machine generated,
      and should be checked for accidental unbounded growth.
      
      While this is technically a breaking change, it's expected that the allowance
      is generous enough that it's a noop. Do note that the previous max was
      MAX_INT or the JVM OOMing, whichever came first, which is something we clearly
      shouldn't allow.
      
      RELNOTES: A maximum attribute name length is 128 is enforced
      PiperOrigin-RevId: 305086330
      0a89cef0
    • mschaller's avatar
      Move a testutil test into a test target so it doesn't run everywhere · 27ec83b0
      mschaller authored
      By being in the :testutil library, ManualSleeperTest was getting run by
      all the tests that include it.
      
      RELNOTES: None.
      PiperOrigin-RevId: 305079796
      27ec83b0
    • kkress's avatar
      Add BUILD files for all of src/[main/test]/.../build/lib/bazel. · 73dcff3b
      kkress authored
      Fixing Bazel required also splitting up the main dir. This required a single
      Java change to break a dependency cycle between pipline and parse in the ninja
      code.  I split NinjaPipeline and NinjaParser into impl/interface allowing the
      cycle to be broken.
      
      RELNOTES: None.
      PiperOrigin-RevId: 305073498
      73dcff3b
    • bbaren's avatar
      Remove most Objective-C dbg and opt compiler flags · 0bbe3817
      bbaren authored
      Currently, Bazel sticks some extra compiler flags in when you compile
      Objective-C in dbg or opt mode. These flags should really be set in a
      CROSSTOOL rather than in the Bazel core, so remove them.
      
      RELNOTES:
      Bazel uses fewer compiler flags by default when building Objective-C. In
      particular, Bazel no longer sets `-O0`, `-DDEBUG=1`,
      `-fstack-protector`, `-fstack-protector-all`, or `-g` in dbg mode, and
      Bazel no longer sets `-Os`, `-DNDEBUG=1`, `-Wno-unused-variable`,
      `-Winit-self`, or `-Wno-extra` in opt mode. If you want to apply these
      flags to your project, you can reenable them in your CROSSTOOL.
      PiperOrigin-RevId: 305065752
      0bbe3817
    • jcater's avatar
      Remove obsolete export-only proto-rules target. · 52616552
      jcater authored
      PiperOrigin-RevId: 305057862
      52616552
    • jcater's avatar
      Update dependencies to use lib/rules/proto instead of lib:proto-rules. · 5bcc67dc
      jcater authored
      No functional changes.
      
      PiperOrigin-RevId: 305057114
      5bcc67dc
    • jcater's avatar
      Move proto-rules into rules/proto. · 40341890
      jcater authored
      No functional changes, just re-organizing packages.
      
      Followup CLs will move dependences to the right place.
      
      PiperOrigin-RevId: 305056478
      40341890
  4. Apr 06, 2020
    • jcater's avatar
      Remove obsolete export-only android-rules target. · 07fe3d41
      jcater authored
      PiperOrigin-RevId: 305036016
      07fe3d41
    • jcater's avatar
      Update dependencies to use lib/rules/android instead of lib:android-rules. · 1f1e567f
      jcater authored
      No functional changes.
      
      PiperOrigin-RevId: 305035335
      1f1e567f
    • jcater's avatar
      Move android-rules into rules/android. · 1c64cd32
      jcater authored
      No functional changes, just re-organizing packages.
      
      Followup CLs will move dependences to the right place.
      
      PiperOrigin-RevId: 305034619
      1c64cd32
    • John Cater's avatar
      Update documentation for the release of 3.0.0. · 8249d1a7
      John Cater authored
      Part of #10742.
      
      Closes #11073.
      
      PiperOrigin-RevId: 305024363
      8249d1a7
    • jcater's avatar
      Move DeterministicWriter to a new class to break a cycle between... · 3751ba91
      jcater authored
      Move DeterministicWriter to a new class to break a cycle between AbstractFileWriteAction and FileWriteActionContext.
      
      PiperOrigin-RevId: 305020556
      3751ba91
    • jcater's avatar
      Display diff in correct order for jdeps_test. · f52f9581
      jcater authored
      PiperOrigin-RevId: 305014344
      f52f9581
    • Bazel Release System's avatar
      Release 3.0.0 (2020-04-06) · 2201827c
      Bazel Release System authored
      Baseline: 3c7cc747
      
      Cherry picks:
      
         + 19e214b4:
           Use prefix encoding for paths.
         + 63b01f7b:
           Avoid file operations in the sandbox creation critical path.
         + 80a2d7cc:
           Implementation (but not plumbing) of the gRPC remote downloader
         + 586eabf4:
           Implement RemoteDownloader w/ `--experimental_remote_downloader`
      
      Incompatible changes:
      
        - Flip --incompatible_remove_enabled_toolchain_types, so that rules
          can no longer access enabled toolchain types from the platform
          fragment.
        - The --incompatible_use_jdk11_as_host_javabase flag has been
          removed (it was flipped in Bazel 0.25.0).
        - Using JDK 9 or 10 as a `--host_javabase` is no longer officially
          supported. As always, you can use the
          `@bazel_tools//tools/jdk:toolchain_vanilla` Java toolchain to use
          older or newer JDKs than what Bazel currently supports.
        - --fatal_event_bus_exceptions is deprecated and should not be
          used. Any crashes should be reported so that they can be fixed.
        - The old-style binary profile format is no longer suppported, use
          the new JSON trace profile instead.
      
      Important changes:
      
        - Improve the performance of creating a sandboxed execution root
          for workers when the number of inputs is large (>1000).
        - Treat .cu and .cl files as C++ source. CUDA or OpenCL are not
          natively supported and will require custom flags to compile with
          e.g. clang.
        - Add actions' primary output details in JSON profile and
          analysis_v2.proto.
        - Add --cds_archive option for embedding CDS archive into deploy
          JAR.
        - Add new global attribute: applicable_licenses
          - Package level default with default_applicable_licenses
          - guarded by --incompatible_applicable_licenses (default true for
          Blaze, false for Bazel)
          - In support of
          https://docs.google.com/document/d/1uwBuhAoBNrw8tmFs-NxlssI6VRolid
          GYdYqagLqHWt8/edit#
        - Non-test Java rules no longer require the TestConfiguration and
          thus --trim_test_configuration is again usable for Java builds
        - The flag `--incompatible_always_check_depset_elements` is enabled
          by default.
        - --incompatible_objc_compile_info_migration determines
          whether native rules can assume compile info has been migrated to
          CcInfo. See https://github.com/bazelbuild/bazel/issues/10854.
        - --incompatible_remove_local_resources is true by default. Please
          use --local_ram_resources and --local_cpu_resources instead of
          --local_resources.
      
      This release contains contributions from many people at Google, as well as Alessandro Patti, Benjamin Peterson, Christy Norman, Dave hughes, David Haxton, David Neil, garyschulte, George Chiramel, George Gensure, Gibson Fahnestock, Greg Estren, Greg, Jason Hoch, Jin, John Millikin, Jonathan Springer, Keith Smiley, Laurent Le Brun, Ulf Adams, Yannic Bonenberger, Yannic, Yihong Wang, Yuchen Dai.
      2201827c
    • plf's avatar
      C++: Fix null pointer exception in LinkerInput equals() · c9010953
      plf authored
      Fixes #10580
      
      RELNOTES:none
      PiperOrigin-RevId: 304998863
      c9010953
  5. Apr 05, 2020
  6. Apr 04, 2020
    • janakr's avatar
      Remove remaining "logging" functionality of AutoProfiler, replace with... · b182a3fc
      janakr authored
      Remove remaining "logging" functionality of AutoProfiler, replace with GoogleAutoProfilerUtils. Also change to make min time always a Duration, and display units always milliseconds.
      
      PiperOrigin-RevId: 304792833
      b182a3fc
    • Googler's avatar
      Update to Copy a Typer Adapter's Dependent Classes · deb0bf55
      Googler authored
      #desugar #new-android-api-support #desugar-shadowed-api
      
      - Previous: unknown commit
      - Expected a No-op of this CL, since there are no out-of-self depedencies for the current converter classes.
      
      PiperOrigin-RevId: 304726348
      deb0bf55
    • ajurkowski's avatar
      Add a null object for GraphTransformerForTesting. · e16cc501
      ajurkowski authored
      The GraphTransformerForTesting has an obvious no-op candidate. Add a
      null-object doing identity transformation to be used instead of null.
      
      PiperOrigin-RevId: 304715195
      e16cc501
    • michajlo's avatar
      Avoid some type hierarchy crawling in common cases of 'type' · 8c42ade5
      michajlo authored
      Check for "direct hits" first in order to avoid unnecessarily walking type
      hierarchies.
      
      A dummy setup checking `type("foo")` in a loop suggests that this removes
      30% of overhead for string/bool/int.
      
      PiperOrigin-RevId: 304698551
      8c42ade5
    • Googler's avatar
      Add Support of Finding Class Dependencies in Java Bytecode · f9aa7b13
      Googler authored
      #desugar #new-android-api-support #desugar-shadowed-api
      
      - Rationale: Allows a type adapter/converter class to depend on other classes in the desugar runtime library binary, such as anonymous classes and utility classes. In the current setup, the copying of a type adapter/converter class into a desugared jar does NOT include its dependencies out of the box. It is error-prone to maintain the manual dependency configuration, particularly update the runtime library without a restriction checker.
      - In this change, I am introducing a search helper to analyze class dependencies. The helper will facilitate to pull the dependencies of an adapter/converter class into the desugared jar.
      
      PiperOrigin-RevId: 304693751
      f9aa7b13
    • jcater's avatar
      Remove obsolete export-only python-rules target. · 69dbd677
      jcater authored
      PiperOrigin-RevId: 304688972
      69dbd677
    • jcater's avatar
      Update dependencies to use lib/rules/python instead of lib:python-rules. · d9d18d76
      jcater authored
      No functional changes.
      
      PiperOrigin-RevId: 304688230
      d9d18d76
    • juliexxia's avatar
      Fix typo in ExecGroup · c2b93c8a
      juliexxia authored
      PiperOrigin-RevId: 304687247
      c2b93c8a
    • jcater's avatar
      Move python-rules into rules/python. · 1cb82d93
      jcater authored
      No functional changes, just re-organizing packages.
      
      Followup CLs will move dependences to the right place.
      
      PiperOrigin-RevId: 304684023
      1cb82d93