aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google
Commit message (Collapse)AuthorAge
* Move anonymous inner class to nested classGravatar ulfjack2017-08-11
| | | | PiperOrigin-RevId: 164844520
* Unify input prefetchingGravatar ulfjack2017-08-10
| | | | | | | All prefetching now goes through AbstractSpawnStrategy's implementation of SpawnExecutionPolicy. Make sure the sandbox runners also do this consistently. PiperOrigin-RevId: 164836877
* Move extra action stuff to analysis.extraGravatar ulfjack2017-08-10
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164835678
* Only patch in C++ compile features when they are not already defined in ↵Gravatar hlopko2017-08-10
| | | | | | | crosstool RELNOTES: None. PiperOrigin-RevId: 164830825
* Quote python_path and launcher in python_stub_template_windows.txtGravatar pcloudy2017-08-10
| | | | | | | Fix https://github.com/bazelbuild/bazel/issues/3531 RELNOTES: None PiperOrigin-RevId: 164830778
* Make repository_ctx.which() portableGravatar David Ostrovsky2017-08-10
| | | | | | | See https://github.com/bazelbuild/bazel/issues/3477 Change-Id: I39e0138ec7489f9d9c1e31ee683dbbf7a72cee95 PiperOrigin-RevId: 164828274
* Implement timeouts on top of Java ProcessGravatar ulfjack2017-08-10
| | | | PiperOrigin-RevId: 164827022
* Cleanup SkylarkDict APIGravatar brandjon2017-08-10
| | | | | | | Reorder a few methods, change some mutators to take Mutability instead of Environment, make it clear that the casting methods return read-only maps (which may be views). Also make putAll/putAllUnsafe public with an appropriately scary javadocs. RELNOTES: None PiperOrigin-RevId: 164776346
* Automated rollback of commit 8adcf839c5c42defaa2fabedfb0208e4ce97ac95.Gravatar ajmichael2017-08-10
| | | | | | | *** Reason for rollback *** RELNOTES: None PiperOrigin-RevId: 164775289
* Remove --experimental_dynamic_configs=off.Gravatar gregce2017-08-10
| | | | | | | | | | | | This is the first in a series of changes stripping out Bazel's static configuration code. This change removes the ability to request static configurations but not the (now orphaned) logic behind them. Because that logic is all over the code base, it will be removed in layers in followup changes. PiperOrigin-RevId: 164769846
* Ensure that invalid target errors are properly reported inGravatar John Cater2017-08-10
| | | | | | | | | ConfiguredTargetFunction. Fixes #3430. Change-Id: Iac1ab3fb4958dc6fb23e92a43a32b81461dcf0f3 PiperOrigin-RevId: 164754851
* Cleanup cast methods for SkylarkListGravatar brandjon2017-08-10
| | | | | | | Ensure that the casted list is unmodifiable (both for mutability correctness and also type correctness), and clearly document this. RELNOTES: None PiperOrigin-RevId: 164739837
* Remove exec from $testing_shbase. It is a sh_library target that we only use ↵Gravatar ajmichael2017-08-10
| | | | | | | to get googletest.sh from to put in the runfiles. RELNOTES: None PiperOrigin-RevId: 164737919
* Defer expansion of certain proto command line string arguments.Gravatar tomlu2017-08-10
| | | | | | | Memory is saved by sharing the format string and label object instances, instead of constructing new strings for each action. RELNOTES: None PiperOrigin-RevId: 164731899
* Deprecate old ordering names for depsetsGravatar vladmos2017-08-10
| | | | | | | | | Old ordering names ("stable", "compile", "naive_link", "link") are deprecated and won't be available if --incompatible_disallow_set_constructor=true is set. Use "default", "postorder", "preorder", and "topological" correspondingly instead. PiperOrigin-RevId: 164728439
* Fix --verbose_failures w/ sandboxing to print the full command lineGravatar ulfjack2017-08-10
| | | | | | Fixes #3521. PiperOrigin-RevId: 164728178
* Improve CustomCommandLine.Gravatar tomlu2017-08-10
| | | | | | | | | | | | | Instead of having custom ArgvFragments for every combination of desired things, we make a combined "interpreter" of argvs. This saves memory and simplifies things as we do not have to allocate a strategy instance per call to args (instead pushing a single shared instance, followed by the args). The generic interpreter does have a lot of branching compared to the bespoke implementations, but because the branch is always the same for long stretches the branch predictor should easily be able to handle it with minimal overhead (~1 cycle per branch IIRC). This CL also elevates that we either want a NestedSet or an ImmutableCollection to the surface of the API, so consumers understand the cost when they call it with a non-immutable collection. Most of the changes in clients is due to this. To cut down on CL churn, @Deprecated forwarding methods are added to CustomCommandLine. These will be removed in a separate CL using IDE inlining. RELNOTES: None PiperOrigin-RevId: 164725370
* Revert collect_coverage change that enables the new Java coverageGravatar elenairina2017-08-10
| | | | | | in blaze. This should be enabled only after the blaze release, otherwise it makes code coverage drop, mainly due to including auto-generated files in the coverage report. PiperOrigin-RevId: 164724689
* Remove `blaze` from the conflict error messageGravatar Gregg Donovan2017-08-10
| | | | | | Closes #3508. PiperOrigin-RevId: 164722086
* Rewrite the Command APIGravatar ulfjack2017-08-10
| | | | | | | | | | | | | | | | | | | | | | | | Important: the simplified API now defaults to forwarding interrupts to subprocesses. I did audit all the call sites, and I think this is a safe change to make. - Properly support timeouts with all implementations - Simplify the API - only provide two flavours of blocking calls, which require no input and forward interrupts; this is the most common usage - provide a number of async calls, which optionally takes input, and a flag whether to forward interrupts - only support input streams, no byte arrays or other 'convenience features' that are rarely needed and unnecessarily increase the surface area - use java.time.Duration to specify timeout; for consistency, interpret a timeout of <= 0 as no timeout (i.e., including rather than excluding 0) - KillableObserver and subclasses are no longer part of the public API, but still used to implement timeouts if the Subprocess.Factory does not support them - Update the documentation for Command - Update all callers; most callers now use the simplified API PiperOrigin-RevId: 164716782
* In the MutableList API, make an internal unsafe method publicGravatar brandjon2017-08-10
| | | | | | | This method acts as an "escape hatch" for mutating a list regardless of Mutability. It should be avoided if at all possible. RELNOTES: None PiperOrigin-RevId: 164716286
* Add reexports to cc rules and cc_shared_library and cc_static_library semanticsGravatar elenairina2017-08-10
| | | | | | Relevant document: https://docs.google.com/document/d/1d4SPgVX-OTCiEK_l24DNWiFlT14XS5ZxD7XhttFbvrI/edit PiperOrigin-RevId: 164715084
* Start event: show id also for non-build requestsGravatar Klaus Aehlig2017-08-10
| | | | | | | | | For requests like fetch, we still produce a sequence of build events, even though nothing is actually built. In the BuildStarting event of that stream, also report the UUID of the request. Change-Id: If34ce6a34221320ed4a24408732ba6d372569d04 PiperOrigin-RevId: 164710704
* Move FilesetProvider to lib.analysis.filesetGravatar ulfjack2017-08-09
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164701931
* Do not add copts feature to crosstools that already define itGravatar hlopko2017-08-09
| | | | | RELNOTES: None. PiperOrigin-RevId: 164701570
* PolishingGravatar Jonathan Bluett-Duncan2017-08-09
| | | | | | | | | | | - Use Java 8 idioms more consistently. - Use newer Guava idioms more consistently. - Apply some IntelliJ IDEA refactoring suggestions. - Other changes made for readability and/or brevity. Closes #3462. PiperOrigin-RevId: 164700946
* Automated rollback of commit f7f1a8f756f33f86b1bdc5023d5052117b62523e.Gravatar laszlocsomor2017-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Updated to avoid https://github.com/bazelbuild/bazel/issues/3501 This is a rollback of a rollback, with additional modifications to BazelConfiguration.java to fix https://github.com/bazelbuild/bazel/issues/3501, the issue that was the reason we rolled back the original change. The additional updates serve to propagate the client's TMP and TEMP envvars to the action, which is a short-term solution to allow actions have a TMP/TEMP envvar on Windows. They need at least one of those to create temp directories. The long-term solution is to set a value for TMP or TEMP in the executor just before executing the actions, so the TMP/TEMP would not be part of the action key. All of this only affects Bazel on Windows. *** Original change description *** Automated rollback of commit 0abf5fa2d64c76def5a8fa0f960b73ce0566af4d. *** Reason for rollback *** Breaks Bazel CI (https://github.com/bazelbuild/bazel/issues/3501) *** Original change description *** Android BusyBox: actions use the default shell env SpawnActions that run the Android BusyBox now use the default shell environment. This has the following benefits: - Bazel propagates the PATH, TMPDIR envvars to the action - Bazel propagates the --action_env envvars to the action This allows the Bazel client to pass --action_env=TMP or --action_env=TEMP (whichever of the envvars is defined) to the server, so the BusyBox actions will have TMP/TEMP set (to the same value as the clientenv), so they can create temp directories using java.nio.file.Files.createTempDirectory. This method seems to be calling the GetTempPath WinAPI function, which needs the TMP or TEMP envvar, otherwise it falls back to returning c:\windows which is non-writable. There's one drawback of using the default shell environment, although @ulfjack is working on it: - PATH is now also part of the action's cache key. However in a single-machine environment (no remote execution) and assuming PATH isn't likely to change between builds, this probably doesn't poision the action cache in practice. This change is a short-term solution. Propagating the client env's TMP/TEMP means we make that part of the action's cache key. The ideal long-term solution will be to not propagate this envvar, and instead let the execution strategy set it to some client-env-independent value. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: I756a4203b5d86c881bc36cc089e35cde0d419914 RELNOTES: none PiperOrigin-RevId: 164696600
* Add flag to use processed resource apk manifest fileGravatar Googler2017-08-09
| | | | | RELNOTES: none PiperOrigin-RevId: 164646858
* Move the Skylark rule infrastructure from lib.rules to lib.analysis.skylarkGravatar ulfjack2017-08-09
| | | | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. Unfortunately, there are a number of reverse deps from analysis code to Skylark classes, so moving these is the only way to make progress. PiperOrigin-RevId: 164612957
* Stop transitively propagating headers transitively for ObjC protos.Gravatar kaipi2017-08-09
| | | | PiperOrigin-RevId: 164590595
* Windows, AndroidBusyBox: always use params filesGravatar laszlocsomor2017-08-09
| | | | | | | | | | | | | | | On Windows, Bazel will always use params files for some BusyBox tools, because some flags of these tools expect values with special characters in them. We need this change so Bazel can safely pass such flags to the BusyBox on Windows. See https://github.com/bazelbuild/bazel/issues/3264 RELNOTES: none PiperOrigin-RevId: 164582899
* Rename some variables for easier understanding of the code.Gravatar elenairina2017-08-09
| | | | PiperOrigin-RevId: 164581142
* Use java.time.Duration for timeoutsGravatar ulfjack2017-08-09
| | | | PiperOrigin-RevId: 164577062
* Change logic of Blaze Java coverage.Gravatar elenairina2017-08-08
| | | | | | | | | | | | | | | | | | Change is needed due to the fact that java_import or other custom rules (genrules or Skylark) do not propagate coverage information. The lack of coverage data is caused by the fact that it is retrieved from compilation information and it is passed around through providers as Artifact(s) (also known as instrumentation metadata). The problem with the current implementation is that there is no way of retrieving instrumentation metadata from arbitrary jars provided by java_import or other custom rules. The instrumentation metadata in the current implementation is a separate jar that contains uninstrumented classes for offline Jacoco instrumentation. This change addresses that problem by having just one jar instead of 2 (the build jar and the instrumentation jar), adding the uninstrumented classes in the build jar and completely removing any other instrumentation metadata. Implementation details: * For each build jar there is a .txt file created that contains the relative path of each Java file. This file will also be included in the final build jar. It is used for recreating the correct path for each covered file when included in the coverage report. * java_binary/java_test will set 2 environment variables: 1) JACOCO_METADATA_JARS - replaces the previous JACOCO_METADATA_JAR that was a jar that merged all the uninstrumented classes on the classpath in one jar. The new environment variable holds the paths of the runtime classpath jars - only some of them contain uninstrumented classes, letting the Jacoco coverage runner to filter and analyze them. 2) JACOCO_MAIN_CLASS - The main class to be called for the current coverage run. Previously this information was embedded in the JACOCO_METADATA_JAR's manifest. PiperOrigin-RevId: 164562533
* Use Sets.new...WithExpectedSize to presize some collectionsGravatar michajlo2017-08-08
| | | | | | | | | | It was noticed that we missed this in commments on https://github.com/bazelbuild/bazel/commit/2266a6f88030e7121031db19fb5efc3fc7cb149c. This a better job of preventing resizes than the former, with the caveat that it may create a larger collection than is necessary. PiperOrigin-RevId: 164520695
* Micro-optimization - presize internal Selector mapGravatar michajlo2017-08-08
| | | | | | No reason not to. PiperOrigin-RevId: 164502264
* Rollforward of "Framework dependency subtraction uses runfiles path instead ↵Gravatar cparsons2017-08-08
| | | | | | | of full artifact path" RELNOTES: None. PiperOrigin-RevId: 164496520
* Improve SyntaxTreeVisitor API.Gravatar laurentlb2017-08-08
| | | | | RELNOTES: None. PiperOrigin-RevId: 164481927
* Clean up Label validation, and introduce a factory method for constructing a ↵Gravatar nharmata2017-08-08
| | | | | | | Label without validation. RELNOTES: None PiperOrigin-RevId: 164479651
* Use Iterators.unmodifiableIterator() for readabilityGravatar brandjon2017-08-08
| | | | | RELNOTES: None PiperOrigin-RevId: 164457611
* Move MakeVariableProvider to lib.analysisGravatar ulfjack2017-08-08
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164456961
* Slight refactor to AttributeValuesMap to permit multiple different efficient ↵Gravatar nharmata2017-08-08
| | | | | | | implementations. RELNOTES: None PiperOrigin-RevId: 164456778
* Only add coverage flags when gcno file is expectedGravatar hlopko2017-08-08
| | | | | | | | | Change https://github.com/bazelbuild/bazel/commit/63dabb6cfd55febc14e221ec51b18120558bc23c refactored the coverage feature, but wrongly started add coverage flags when the gcno file was not expected/read by bazel. This can be harmful, since the size of inputs increases unnecessarily. RELNOTES: None. PiperOrigin-RevId: 164455431
* Do not expand inputs in CppLinkAction.execute().Gravatar Benjamin Peterson2017-08-07
| | | | | | | | All spawn strategies must expand artifacts, so actions shouldn't themselves. Change-Id: I051f7a6fee31330893271fbec7b93197bd4292f3 PiperOrigin-RevId: 164449128
* Move RuleConfiguredTargetFactory to lib.analysisGravatar ulfjack2017-08-07
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164446955
* Move AliasProvider to lib.analysisGravatar ulfjack2017-08-07
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164438390
* bes,remote: update default auth scope.Gravatar buchgr2017-08-07
| | | | PiperOrigin-RevId: 164436416
* Add tuple * int multiplication operatorGravatar brandjon2017-08-07
| | | | | | | I.e., ('a', 'b') * 3 == ('a', 'b', 'a', 'b', 'a', 'b'), like lists. RELNOTES: None PiperOrigin-RevId: 164403099
* Fix mutability bug in SkylarkList/SkylarkMap Java APIsGravatar brandjon2017-08-07
| | | | | | | | | Previously, you could modify a frozen MutableList indirectly via its iterator(). This CL wraps the underlying list with a Collections.unmodifiableList when obtaining the iterator, and likewise for other methods that return views over Skylark data structures. This also eliminates the SkylarkList#getContents method in favor of just using the SkylarkList object itself. RELNOTES: None PiperOrigin-RevId: 164402129
* Turn off C++ provider propagation from java_proto_library, until ↵Gravatar carmi2017-08-07
| | | | | | | J2ObjcAspect ignores them. RELNOTES: None PiperOrigin-RevId: 164335492