Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/bazelbuild/bazel.git. Pull mirroring updated .
  1. Jul 19, 2019
  2. Jul 16, 2019
  3. Jul 11, 2019
    • Bazel Release System's avatar
      Release 0.28.0 (2019-07-10) · 18cd9048
      Bazel Release System authored
      Baseline: 2e374a9c
      
      Cherry picks:
      
         + 6d0b14b9:
           rule_test: apply "tags" to all rules in the macro
      
      Incompatible changes:
      
        - Add --incompatible_enable_profile_by_default to enable the JSON
          profile by default.
        - The --incompatible_windows_style_arg_escaping flag is flipped to
          "true", and the "false" case unsupported. Bazel no longer accepts
          this flag.
      
      Important changes:
      
        - Bazel now supports hiding compiler warnings for targets that
          you're not explicitly building (see
          https://docs.bazel.build/versions/master/user-manual.html#flag--au
          to_output_filter).
        - Flag `--incompatible_restrict_escape_sequences` is added. See
          https://github.com/bazelbuild/bazel/issues/8380
        - The "info" command now supports the "starlark-semantics"
          argument, which outputs a representation of the effective Starlark
          semantics option values.
        - The `outputs` parameter of the `rule()` function is deprecated
          and attached to flag `--incompatible_no_rule_outputs_param`.
          Migrate rules to use `OutputGroupInfo` or `attr.output` instead.
          See https://github.com/bazelbuild/bazel/issues/7977 for more info.
        - When `--incompatible_strict_action_env` is enabled, the default
          `PATH` now includes `/usr/local/bin`.
        - Turn on --experimental_build_setting_api by default for starlark
          build settings (see
          https://docs.bazel.build/versions/master/skylark/config.html#user-
          defined-build-settings for more info)
        - `@bazel_tools//tools/jdk:toolchain_java10` and
          `@bazel_tools//tools/jdk:toolchain_java11` are now available to
          enable java 10, respectively java 11 language level support.
        - The `command` parameter of the `actions.run_shell()` function
          will be restricted to only accept strings (and not string
          sequences). This check is attached to flag
          `--incompatible_run_shell_command_string`. One may migrate by
          using the `arguments` parameter of `actions.run()` instead. See
          https://github.com/bazelbuild/bazel/issues/5903 for more info.
        - Incompatible change
          `--incompatible_use_platforms_repo_for_constraints` has been
          added. See https://github.com/bazelbuild/bazel/issues/8622 for
          details.
        - Incompatible change
          `--incompatible_use_platforms_repo_for_constraints` has been
          added. See https://github.com/bazelbuild/bazel/issues/8622 f...
        - Bazel's C++ autoconfiguration now understands `BAZEL_LINKLIBS`
          environment variable to specify system libraries that should be
          appended to the link command line.
        - paths under the execution root starting with "." or "_" will be
          re-linked across builds
        - execution_log_json_file now allows actions without outputs.
        - Labels aapt as deprecated for aapt_version, and heavily endorses
          aapt2.
        - Update doc links still pointing to cc_binary.features to point to
          common features
        - Incompatible change
          `--incompatible_use_platforms_repo_for_constraints` has been
          added. See https://github.com/bazelbuild/bazel/issues/8622 for
          details.
          RELNOTES:
        - --incompatible_disable_nocopts flag has been added. See
          https://github.com/bazelbuild/bazel/issues/8706 for details.
        - Fixed treatment of <dist:module /> tags in AndroidManifest.xml
        - Fixed asset precedence for android_binary rules with aapt2.
        - Bazel now officially supports running on CentOS 7.
        - The runtime dynamic libraries are no longer in default output
          group of cc_binary.
        - set the FDOBuildType as CSFDO for binaries built with
          --cs_fdo_absolute_path.
        - Bazel can now be bootstrapped and built on arm64 platforms
          without requiring any flags or patches.
        - Fixed treatment of AndroidManifest.xml attributes which contained
          XML escaping
        - Retire experimental blaze flag
          experimental_link_compile_output_separately. The same behavior is
          available through the feature dynamic_link_test_srcs.
        - --incompatible_load_java_rules_from_bzl was added to forbid
          loading the native java rules directly. See more on tracking
          issue #8746
        - Turn on --experimental_build_setting_api by default for starlark
          build settings (see
          https://docs.bazel.build/versions/master/skylark/config.html#user-
          defined-build-settings for more info)
        - Attribute names are going to be restricted and must be
          syntactically valid identifiers.
          https://github.com/bazelbuild/bazel/issues/6437
        - rule_test: fix Bazel 0.27 regression ("tags" attribute was
          ingored, https://github.com/bazelbuild/bazel/issues/8723
      
      This release contains contributions from many people at Google, as well as Ben Diuguid, Benjamin Peterson, Dave Lee, Loo Rong Jie, Mark Butcher, Marwan Tammam, Pedro Alvarez.
      0.28.0
      18cd9048
  4. Jul 08, 2019
  5. Jul 02, 2019
  6. Jul 01, 2019
    • Tobias Werth's avatar
      Do not re-compress during dev build. · 518c8b3f
      Tobias Werth authored
      Instead of building the target //src:bazel use //src:bazel-dev.
      
      File I/O is much slower on Windows compared to Linux and the
      recompressing step was causing a multi-minute slowdown on Windows.
      
      This change should bring iteration times of simple changes for Bazel
      developers down to significantly less than a minute.
      
      RELNOTES: None
      
      Closes #8760.
      
      PiperOrigin-RevId: 255962558
      518c8b3f
    • ulfjack's avatar
      GC reduction: convertStarlarkArgumentsToJavaMethodArguments · cf76aeb3
      ulfjack authored
      - use ArrayList instead of ImmutableList.Builder
        This reduces the number of copies by one, because
        ImmutableList.Builder.build makes a copy, and toArray makes another
        copy, whereas with ArrayList the first copy goes away (the second still
        applies).
      - use CompactHashSet instead of LinkedHashSet
      - avoid creating a new Set if it's going to be empty
        note that CompactHashSet actually _increases_ memory consumption for
        empty sets, so we need to make sure that we don't do that
      
      On a benchmark, this reduces memory allocation by this method by a
      factor of more than 2.
      
      PiperOrigin-RevId: 255959188
      cf76aeb3
    • hlopko's avatar
      Remove incorrect cache in AndroidLocalTest.java · c2d088f5
      hlopko authored
      Fixes https://github.com/bazelbuild/bazel/issues/8693
      
      RELNOTES: None.
      PiperOrigin-RevId: 255958717
      c2d088f5
    • Yun Peng's avatar
      8167f46c
    • ulfjack's avatar
      Support setting different UI progress modes · 86e518a5
      ulfjack authored
      This change adds a flag to select between UI progress modes. The initial
      values are oldest_actions and mnemonic_histogram; the latter of these is
      also added in this change.
      
      The new mode turned out to be useful for debugging an issue where Bazel
      ran out of memory due to a high number of ActionExecutionFunction
      Skyframe restarts.
      
      PiperOrigin-RevId: 255952215
      86e518a5
    • ulfjack's avatar
      Query performance: don't copy on every eval call · 1cf2f7b5
      ulfjack authored
      Every query function calls into this method to eval any relevant
      sub-queries, and making a copy on every call is a very, very expensive
      proposition. However, graphless query does not use streaming, i.e., all
      functions make a single call to the callback, so this defensive
      mechanism is simply unnecessary.
      
      We only make this change for the new query environment, rather than more
      generally.
      
      For queries with a hot Bazel server (and all packages already loaded),
      this can improve performance by as much as 2x.
      
      Before (first run omitted):
      real    0m1.308s
      real    0m1.285s
      real    0m1.524s
      
      After (first run omitted):
      real    0m0.650s
      real    0m0.549s
      real    0m0.521s
      
      PiperOrigin-RevId: 255951627
      1cf2f7b5
    • Googler's avatar
      bazel syntax: eliminate LValue · ade5327a
      Googler authored
      This reduces the number of nodes allocated by the parser.
      
      The logic of LValue is now moved into Eval, the tree-based evaluator.
      A follow-up change will move all the Evaluator.eval methods into this class too,
      so that the tree-based evaluator is entirely confined to this class.
      
      ASTNode methods that used to return an LValue are now named getLHS.
      
      PiperOrigin-RevId: 255950649
      ade5327a
    • Marcel Hlopko's avatar
      Update platforms.md documentation · b4f3d837
      Marcel Hlopko authored
      Closes #8513.
      
      PiperOrigin-RevId: 255944103
      b4f3d837
    • dslomov's avatar
      Fix reference to internal-only directory in documentation. · bb96af52
      dslomov authored
      RELNOTES: None.
      PiperOrigin-RevId: 255936305
      bb96af52
    • Laszlo Csomor's avatar
      Windows: remove incompatible_windows_style_arg_escaping · ecac47d0
      Laszlo Csomor authored
      In this PR:
      
      - Removed the
        `--incompatible_windows_style_arg_escaping` flag
        and all code for its "false" case.  The flag is
        flipped to true.
      
      - In WindowsProcessesTest, the
        testDoesNotQuoteArgWithDoubleQuote method is
        replaced by testQuotesArgWithDoubleQuote, i.e.
        the test logic is reversed. The new test shows
        the correct behavior, the old test was wrong.
      
      See https://github.com/bazelbuild/bazel/issues/7122
      See https://github.com/bazelbuild/bazel/issues/7454
      
      RELNOTES[INC]: The --incompatible_windows_style_arg_escaping flag is flipped to "true", and the "false" case unsupported. Bazel no longer accepts this flag.
      
      Closes #8003.
      
      PiperOrigin-RevId: 255929367
      ecac47d0
    • Googler's avatar
      Automated rollback of commit e114d8a0. · 5d72d4ea
      Googler authored
      *** Reason for rollback ***
      
      TAP has detected 10 or more targets failed to build at https://github.com/bazelbuild/bazel/commit/e114d8a04fe07dd32fee41b3cd2e5794f10a5a9d.
      
      TO ROLLFORWARD (without additional approval): Use[]
      
      To see all broken targets visit []
      To prevent noise from flakes, TAP double-checked the following target fails to build:
      []
      but used to build fine:
      []
      
      Questions? Comments? See the URL:[]
      
      *** Original change description ***
      
      bazel syntax: don't use exceptions for control flow
      
      Previously, break, continue, and return were implemented by
      throwing and catching exceptions.
      
      Now, the Eval.exec methods return a token to indicate the
      continuation: one of PASS, BREAK, CONTINUE, or RETURN.
      In addition, the return value is saved in the Eval,
      which is good for only one function invocation.
      
      This is simpler (and slightly more efficient).
      
      Also:
      - FlowStatement now includes PASS too; PassStatement is gone.
      - ReturnException is g...
      
      ***
      
      PiperOrigin-RevId: 255883540
      5d72d4ea
    • Googler's avatar
      bazel syntax: don't use exceptions for control flow · e114d8a0
      Googler authored
      Previously, break, continue, and return were implemented by
      throwing and catching exceptions.
      
      Now, the Eval.exec methods return a token to indicate the
      continuation: one of PASS, BREAK, CONTINUE, or RETURN.
      In addition, the return value is saved in the Eval,
      which is good for only one function invocation.
      
      This is simpler (and slightly more efficient).
      
      Also:
      - FlowStatement now includes PASS too; PassStatement is gone.
      - ReturnException is gone, plus one EvalException constructor.
      PiperOrigin-RevId: 255882194
      e114d8a0
  7. Jun 29, 2019
    • Googler's avatar
      Fix memory leak of Reporter through System.err. · dfb4926d
      Googler authored
      During the lifetime of a Blaze command, we patch System.out and System.err with custom PrintStream instances (containing a ReporterStream). ReporterStream transitively retains some expensive objects, notably anything registered on the EventBus. Anyone is free to read and retain our PrintStream wrapping ReporterStream via System.out or System.err until the command completes.
      
      This change uses an additional layer of control to switch back to the default System.out and System.err and free the custom streams, even if someone retains a reference.
      
      RELNOTES: None.
      PiperOrigin-RevId: 255754558
      dfb4926d
    • nharmata's avatar
      Have StarlarkNativeModule#glob handle IllegalArgumentException. · 5e025a15
      nharmata authored
      A recent change to MethodDescriptor#call removed the handling of Throwablbe there, so therefore it's necessary to do something somewhere.
      
      RELNOTES: None
      PiperOrigin-RevId: 255619205
      5e025a15
  8. Jun 28, 2019
  9. Jun 27, 2019
    • Laszlo Csomor's avatar
      Tests: print a warning if zip failed · 168ee7c5
      Laszlo Csomor authored
      If test-setup.sh fails to create the undeclared
      outputs zip, then print a warning but carry on.
      Failing to create this zip is a nuisance but not a
      fatal error.
      
      The warning is printed to the test log. If the
      test fails, this is printed to the console too. If
      the test passes, then the warning remains only in
      the test log (Bazel prints no output for passing
      tests).
      
      Fixes https://github.com/bazelbuild/bazel/issues/8336
      
      Change-Id: Iee8121d76e96445252d97142cef68c50afbb25b1
      
      Closes #8720.
      
      Change-Id: Iee8121d76e96445252d97142cef68c50afbb25b1
      PiperOrigin-RevId: 255401321
      168ee7c5
    • kendalllane's avatar
      Add providerName and ruleName to output protos. · 26e94c9f
      kendalllane authored
      PiperOrigin-RevId: 255396190
      26e94c9f
    • vladmos's avatar
      Throw a Starlark error in case of no outputs · b5ae7d35
      vladmos authored
      With https://github.com/bazelbuild/bazel/commit/af53a11104b549cca8b593a1f8cac224a21727da, if a Starlark error is not thrown hereexplicitly,
      Blaze crashes later in SpawnAction.java when it calls `output.get(0)`.
      
      PiperOrigin-RevId: 255392440
      b5ae7d35
    • philwo's avatar
      Add OpenJDK 11 archives for aarch64 (arm64). · 9f7fe693
      philwo authored
      This allows users to build Bazel on arm64 machines without requiring any flags.
      
      RELNOTES: Bazel can now be bootstrapped and built on arm64 platforms without requiring any flags or patches.
      PiperOrigin-RevId: 255391424
      9f7fe693
    • lberki's avatar
      Remove the distinction between mandatory and non-mandatory artifact... · 36df7edd
      lberki authored
      Remove the distinction between mandatory and non-mandatory artifact dependencies in ArtifactFunction.
      
      This used to be used for implementing C++ include scanning: it's possible that a change both removes a header file and the reference to it. In the subsequent build, Blaze still needs to stat the removed file to verify whether the action cache entry is still valid; it's not, of course, since if the reference to the file is removed, at least one still-existing source file changes, but we don't know that at the time we check for an action cache hit.
      
      So the action cache referencing a missing file should not be an error. Previously, this was implemented by a bit on the SkyKey of ArtifactFunction, which indicated whether an exception should be raised if the source file is missing.
      
      However, it's just as simple to do this in ActionExecutionFunction, which has the benefit of limiting knowledge of this quirk to ActionExecutionFunction and requiring fewer Skyframe nodes and edges.
      
      In certain cases, it can also result in performance benefits: if a discovered input is already statted before an action requiring it starts executing, no Skyframe restart is needed anymore.
      
      Note that things are still not perfect: in particular, it's possible that when a reference to a discovered file is removed and that file is simultaneously replaced with symlink cycle (or made unreadable in some other way), we still raise an error and fail the build. This isn't new behavior introduced by this change, though.
      
      RELNOTES: None.
      PiperOrigin-RevId: 255388509
      36df7edd
    • Googler's avatar
      Make GroupedList.getAllElementsAsIterable return a collection. · 04fc26c9
      Googler authored
      When passed to Iterables.size, this is taking the code path that counts all of the iterator's elements even though we already track the number of elements in GroupedList.
      
      Storing the collection view as a field since it is used multiple times per GroupedList on average.
      
      PiperOrigin-RevId: 255382362
      04fc26c9
    • Loo Rong Jie's avatar
      [singlejar] Support long path for param file · 06202aae
      Loo Rong Jie authored
      FIxes #8717
      
      Closes #8734.
      
      PiperOrigin-RevId: 255352603
      06202aae
    • hlopko's avatar
      Automatic code cleanup. · 3d8b5796
      hlopko authored
      PiperOrigin-RevId: 255343132
      3d8b5796