| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
| |
to rules that use the $(JAVA) or the $(JAVABASE) Make variable.
This is necessary because a future Blaze version will require this for rules that use said Make variables. This incompatible change can be tested today by adding the --noexperimental_enable_jvm_configuration_make_variables command line option to Blaze.
This change is part of a large-scale change ([]
RELNOTES: None.
PiperOrigin-RevId: 176834987
|
|
|
|
|
|
| |
https://github.com/bazelbuild/bazel/commit/0ebb3e54fc890946ae6b3d059ecbd50e4b5ec840.
PiperOrigin-RevId: 176774887
|
|
|
|
| |
PiperOrigin-RevId: 176521744
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test case test_failed_actions_with_keep_going was never correct
and only worked by accident: it relied on bazel starting at least
two actions, if for there are at least two where all the dependencies
are already met; however bazel is clever and analyzes the resources
of the system it is running in, and if they are small will only run one
genrule at a time. Fix this by telling it to run 2 actions and lying
about the available resources of the local system.
Also increase the test size and reenable the test for remote execution.
Fixes #3995.
Change-Id: Ic84de17a98a2e74c24901d4efb38d7631de4690a
PiperOrigin-RevId: 176511026
|
|
|
|
|
| |
Change-Id: I0d77f491422c41831b2840fb7256526f273abbd0
PiperOrigin-RevId: 176502405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is applying the version 1.1 of the specification (https://reproducible-builds.org/specs/source-date-epoch/)
where the only timestamp that Bazel puts in the final targets is overridden by the value of SOURCE_DATE_EPOCH.
This change also remove the legacy SOURCE_DATE_EPOCH handling which wasn't really following
the spec.
Note that Bazel itself tries hard to remove all timestamps from intermediary binaries and
overridde SOURCE_DATE_EPOCH in most action, which is a not according to the version 1.0 of the spec
but according to the expected change for version 1.1.
RELNOTES: SOURCE_DATE_EPOCH (https://reproducible-builds.org/specs/source-date-epoch/) can
be used to override the timestamp used for stamped target (when using --stamp).
Fixes #2240.
Change-Id: I074e7905fa6745cc706f7391340aeae9188909ca
PiperOrigin-RevId: 176489717
|
|
|
|
|
|
|
|
|
|
| |
Fix for #4035
@laszlocsomor
Closes #4110.
PiperOrigin-RevId: 176346381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
performance.
Shaves ~30-40 seconds off the critical path. The critical path is now dominated by the NDK test, but that's out of scope for this change. See below for data.
BEFORE:
$ bazel test //src/test/shell/bazel/android:android_integration_test
INFO: Analysed target //src/test/shell/bazel/android:android_integration_test (0 packages loaded).
INFO: Found 1 test target...
[4 / 5] Testing //src/test/shell/bazel/android:android_integration_test; 23s linux-sandbox
Target //src/test/shell/bazel/android:android_integration_test up-to-date:
/tmp/bazel-bin/src/test/shell/bazel/android/android_integration_test
INFO: Elapsed time: 93.696s, Critical Path: 93.37s
INFO: Build completed successfully, 2 total actions
//src/test/shell/bazel/android:android_integration_test PASSED in 93.4s
AFTER:
$ bazel test :all --nocache_test_results
WARNING: The major revision of the Android NDK referenced by android_ndk_repository rule 'androidndk' is 15. The major revisions supported by Bazel are [10, 11, 12, 13, 14]. Defaulting to revision 14.
WARNING: API level 26 specified by android_ndk_repository 'androidndk' is not available. Using latest known API level 25
INFO: Analysed 9 targets (0 packages loaded).
INFO: Found 2 targets and 7 test targets...
INFO: Elapsed time: 106.452s, Critical Path: 105.66s
INFO: Build completed successfully, 8 total actions
//src/test/shell/bazel/android:aidl_integration_test PASSED in 43.9s
//src/test/shell/bazel/android:android_integration_test PASSED in 55.1s
//src/test/shell/bazel/android:android_ndk_integration_test PASSED in 105.6s
//src/test/shell/bazel/android:android_sdk_integration_test PASSED in 68.4s
//src/test/shell/bazel/android:desugarer_integration_test PASSED in 43.9s
//src/test/shell/bazel/android:proguard_integration_test PASSED in 43.7s
//src/test/shell/bazel/android:resources_integration_test PASSED in 51.4s
Executed 7 out of 7 tests: 7 tests pass.
RELNOTES: None.
PiperOrigin-RevId: 176144822
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 176057393
|
|
|
|
|
|
| |
Fixes #1479.
PiperOrigin-RevId: 175979487
|
|
|
|
|
|
|
|
|
|
| |
Bazel used to fail the entire build if there is a single error with remote
spawn cache. This could happen on unreliable network or when server is under
load. This change will allow Bazel to fallback to local execution with a
warning.
Change-Id: I0bd41dc862b33a2ab2ab772d8ce9c943476edbf4
PiperOrigin-RevId: 175951699
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The deps are passed through into the generated java_import and aar_import rules. This is necessary for AARs with resource dependencies since maven_aar ignores transitive dependencies. It's less significant for the Java rules, since typically JARs on Maven are compiled class files and as such only have runtime dependencies.
Example usage:
```
# WORKSPACE
load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl", "maven_aar")
maven_aar(
name = "android_image_cropper",
artifact = "com.theartofdev.edmodo:android-image-cropper:2.3.1",
deps = [
"@androidsdk//com.android.support:appcompat-v7-24.1.1",
],
)
```
Fixes https://github.com/bazelbuild/bazel/issues/2863.
Fixes https://github.com/bazelbuild/bazel/issues/3980.
Also, cleans up some broken stuff in the tests (sadly, they don't run on jenkins, so nothing caught that they were broken). test_maven_jar_with_classifier_skylark still does not work, so I disabled.
RELNOTES: Add deps attribute to Skylark maven_aar and maven_jar workspace rules.
PiperOrigin-RevId: 175698282
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend our integration test that verifies that bazel can
successfully be bootstrapped from the distribution artifact,
to also verify that SOURCE_DATE_EPOCH is honored. As the
bazel binary created contains a time stamp, we need to support
it being set from the invocation to ensure a reproducible
build. The standard way of setting time stamps to be embedded
is setting the SOURCE_DATE_EPOCH environment variable. So ensure
that that time stamp occurs in the version output.
Change-Id: Ib6388104d83426b6a74d995c324adee586560fe7
PiperOrigin-RevId: 175546459
|
|
|
|
|
|
| |
Those tools are dependent on the host bazel (the one used for running the test) and that caused the test to be broken by the nightly.
PiperOrigin-RevId: 175462157
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memory-saving non-incremental mode independent of --batch and --discard_analysis_cache.
A command run with --nokeep_incrementality_data will discard data that would be needed for incremental builds. Subsequent commands can be sent to the same server, but they will not get the benefit of incrementality from this command. However, if --keep_incrementality_data is specified on a subsequent command, the commands after that will get the benefits of incrementality.
There are two benefits to not being dependent on --batch. First, this allows Bazel servers to be run in extreme memory-saving mode without the startup penalties (JVM startup, JITting) that --batch execution imposes. Second, this allows Bazel developers to inspect the state of a Bazel server after an extreme memory-saving build.
In order to avoid discarding data unnecessarily (for instance, on a "bazel info used-heap-size-after-gc" or "bazel dump --skyframe=summary") the actual resetting of the graph is done lazily, right before its use in SequencedSkyframeExecutor#sync. This is morally a partial rollback of https://github.com/bazelbuild/bazel/commit/98cd82cbdcac7c48164a611c5a9aa8fc2f1720ef.
For now, our tests specify all of the flags. After this change sticks, I plan to get rid of the --batch flag from these tests, which should allow for some clean-ups. Eventually --batch and --discard_analysis_cache may not imply that we don't keep incremental state: we can require that it be specified explicitly.
PiperOrigin-RevId: 175335075
|
|
|
|
|
|
| |
on a graph without edges. Now we fail gracefully.
PiperOrigin-RevId: 175294923
|
|
|
|
|
|
|
|
|
|
| |
The build event protocol reports certain actions that are particularly
important to the user, in particular failed ones. Also report the precise
command line of those actions, if available. This is useful for IDEs
wanting to report errors in a more precise way.
Change-Id: I04224185ea46c608ad0dfcdb2e772071ca0736b3
PiperOrigin-RevId: 175203502
|
|
|
|
|
|
|
|
|
| |
Knowing the kind of action that was reported (and hence likely failed)
helps users quickly understand what possibly went wrong. So report this
information.
Change-Id: Ie4869234df895f404ac5d2ff6f05026e4e82ef7e
PiperOrigin-RevId: 175043006
|
|
|
|
|
|
|
| |
Fix #2760.
Change-Id: Iab98fad1ca025c4af7a7048bb7048947ef90d61d
PiperOrigin-RevId: 175030992
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 174884178
|
|
|
|
|
|
|
| |
Fix #4027.
Change-Id: I609286c21bd6c503196d122205423726d7e42997
PiperOrigin-RevId: 174880389
|
|
|
|
|
|
| |
Fixes #2355.
PiperOrigin-RevId: 174871644
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 174803631
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Building a binary rule does not generally ensure that the runfiles
trees of its transitive data dependencies are up-to-date, so it's
generally a bad idea to use a dependency's runfiles tree from the
primary target. See https://github.com/bazelbuild/bazel/issues/3919
for an example of the problems this can cause.
This CL ensures that we pick the primary target's runfiles tree when
executing a java_binary from a runfiles tree.
This makes the Java runfiles path resolution similar to that of the
Python rules. (See commit [1].)
[1] 58ee85afcab07374dabc5493c780cbe3369b644f ("Don't follow symlink when looking for python module space")
Change-Id: I412ede5cf02ab2c407e45a2b262442ca67df9ba6
PiperOrigin-RevId: 174501597
|
|
|
|
| |
PiperOrigin-RevId: 174482602
|
|
|
|
| |
PiperOrigin-RevId: 174481563
|
|
|
|
| |
PiperOrigin-RevId: 174202685
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change removes Bazel's dependency on Hazelcast. This will help to reduce
size of the Bazel binary and simplify the usage of remote cache.
However Hazelcast library is still kept in the repository and still being
used by remote_worker. It is useful as a REST server to allow integration
testing with the remote rest cache functionality.
Change-Id: Ia21b970cedaec84bc6c13e839509d838acb5756f
PiperOrigin-RevId: 173880600
|
|
|
|
| |
PiperOrigin-RevId: 173607594
|
|
|
|
|
|
|
|
|
|
| |
After the completion of the build, also report useful logs/statistics.
Do so in a separate event, so that the protocol allows reporting build
completion early and purely staticial information later, maybe event after
some computations.
Change-Id: Ibd221546de76fcffcda7819c300187eac45ebd68
PiperOrigin-RevId: 173548733
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 173443657
|
|
|
|
|
|
|
| |
This is cleaner and will help when we eventually add tests for flags controlling the global environment.
RELNOTES: None
PiperOrigin-RevId: 173388860
|
|
|
|
|
|
|
|
|
| |
If bazel is asked to only analyze a target, but not do any builds,
correctly report this as the cause why the obtained configured targets were
never completed.
Change-Id: I6308f8c222861dc0205a63664d5ea9861dd38b6a
PiperOrigin-RevId: 173364084
|
|
|
|
|
|
|
|
|
| |
If the build is aborted due to a cyclic dependency, correctly
report so in the build event protocol. In particular, close the
stream of events.
Change-Id: Iff86213904a99c6af6a1da90fb229bba8e51c91f
PiperOrigin-RevId: 173247825
|
|
|
|
| |
PiperOrigin-RevId: 173178028
|
|
|
|
| |
PiperOrigin-RevId: 173162773
|
|
|
|
|
|
|
|
|
|
| |
Design is https://github.com/bazelbuild/bazel/issues/3826, specifically
https://github.com/bazelbuild/bazel/issues/3826#issuecomment-336220897.
Fixes #3826.
RELNOTES: ctx.outputs.executable is deprecated. Use DefaultInfo(executable = ...) instead.
PiperOrigin-RevId: 173132066
|
|
|
|
|
|
| |
test to make sure we are using the expected type of node entries when discarding/keeping graph edges.
PiperOrigin-RevId: 173131307
|
|
|
|
|
| |
RELNOTES: Skylark semantics flags now affect WORKSPACE files and repository rules.
PiperOrigin-RevId: 173130286
|
|
|
|
|
|
|
|
|
| |
values are missing while fetching toolchains.
Fixes #3928.
Change-Id: I4fde784f56daf544ba70c9848e006f1183c20a99
PiperOrigin-RevId: 172922687
|
|
|
|
|
|
|
|
|
| |
If bazel is asked to only load target, but not perform an analysis
phase, correctly report this as the cause why the obtained targets wer
never configured.
Change-Id: Ib630a6dc1b955b810a6cc40254c0ae746e2eca1e
PiperOrigin-RevId: 172787777
|
|
|
|
|
|
|
|
|
|
|
| |
versions as flags.
This will serve to replace AppleConfiguration#lateBoundOptionDefaults(). That one has to go away so that AppleConfiguration doesn't need to know the contents of the xcode_config rule anymore.
Progress towards #3424.
RELNOTES: None.
PiperOrigin-RevId: 172569961
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test assumes linking and loading behavior only present on darwin, it
doesn't make sense to run this test on other platforms. But our CI does. This cl
makes the test pass without executing anythign when run on a non-darwin
platform.
E.g. of failure: http://ci.bazel.io/blue/organizations/jenkins/bazel-tests/detail/bazel-tests/1088/pipeline/26
RELNOTES: None.
PiperOrigin-RevId: 172446997
|
|
|
|
|
|
|
|
|
| |
An option has precedence over previous options at the same enum-valued priority. Track its placement in this ordering explicitly.
This will allow after-the-fact expansion of expansion options such that they correctly take precedence or not compared to other mentions of the same flag. This is needed to fix --config's expansion.
RELNOTES: None.
PiperOrigin-RevId: 172367996
|
|
|
|
|
|
|
|
|
|
|
| |
For tools that wrap Bazel in some way, the original way that the tool was invoked can be a useful piece of information to track when logging what Bazel did and why.
In order to output this information in the same way that Bazel outputs its command lines, we accept --tool_command_line in the structure command line format that Bazel uses in the BEP. These structured command lines are protos that we expect as a base64 encoded byte array. For simple scripts that wish to use this feature without compiling the proto, we will also accept any old string (that cannot be interpreted as a base64 encoding) as a single "chunk" in a structured command line.
This is experimental for now and users should not get attached to the format. We will remove the experimental_ prefix when it is stable.
RELNOTES: None.
PiperOrigin-RevId: 172341216
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests depend on the target pattern evaluation strategy used.
Make them specify the target pattern evaluator they need. Same,
if the tests depend on a particular human-readable output stream.
While there, also increase shard count for the bazel_repository_cache_test
to speed it up.
RELNOTES: None
PiperOrigin-RevId: 172328801
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every build and test action that creates a Spawn
will now have platform-specific environment
variables for temp directories:
- on Windows: TMP and TEMP
- on Linux/Darwin: TMPDIR
This is particularly important on Windows where
e.g. Java programs cannot create temp directories
unless there's a valid TMP or TEMP environment
variable set.
Fixes:
- https://github.com/bazelbuild/bazel/issues/1590
- https://github.com/bazelbuild/bazel/issues/2349
- https://github.com/bazelbuild/bazel/issues/2870
Change-Id: Ib758307daf6b3a51b0f71ae5e65e5bb564dad643
PiperOrigin-RevId: 172326371
|
|
|
|
|
|
|
|
|
|
| |
There are different versions of sed, some implicitly add a newline
character to the last line, some don't. To work around, add an
additional newline character (so that the file for sure is
newline-terminated) to all the files we're editing/comparing.
Change-Id: I83e829f26dae839a965349fa137909249b581105
PiperOrigin-RevId: 172312277
|
|
|
|
|
|
|
|
|
|
| |
There is a conceptual difference between the (maybe unsuccessful) completion
of a top-level target and a label as the root cause for a failure (i.e., a
missing source file). Indicate that difference as such, by having a separate
message for failures associated with an unconfigured label.
Change-Id: I3f2e20d4dc85782eb11b104a7baf089e66d972e7
PiperOrigin-RevId: 172299938
|
|
|
|
|
|
|
| |
Make them specify the target pattern evaluator they need.
RELNOTES: None
PiperOrigin-RevId: 172296001
|