aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java
Commit message (Collapse)AuthorAge
* Rework LoadingPhaseCompleteEvent & AnalysisPhaseCompleteEvent to account for ↵Gravatar nharmata2017-07-19
| | | | | | | the fact that loading and analysis is now interleaved. RELNOTES: None PiperOrigin-RevId: 162388460
* Turn on objc crosstool use in Bazel by default.Gravatar cpeyser2017-07-19
| | | | PiperOrigin-RevId: 162388184
* Split invocation policy from the optionsparser target.Gravatar ccalvarin2017-07-19
| | | | | | //src/main/java/com/google/devtools/common/options:options is now free of bazel protos, once again. PiperOrigin-RevId: 162385612
* Clean up a few Skylark-Skyframe structuresGravatar brandjon2017-07-19
| | | | | | | Add value-class methods to SkylarkFileDependency and SkylarkImportLookupValue. Remove Java serialization hack from Extension. RELNOTES: None PiperOrigin-RevId: 162383283
* Ignore case in documentation indexGravatar laurentlb2017-07-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 162373757
* Clean up ConfigFeatureFlagProvider.Gravatar mstaib2017-07-19
| | | | | | | | | | | | Restrict visibility of the Skylark constructor to the package, which is still necessary because ConfigSkylarkCommon exposes it, otherwise it would be private. It matters less now that these providers are type-safe, but it's still slightly cleaner. RELNOTES: None. PiperOrigin-RevId: 162367759
* Fix string representation for the Root classGravatar vladmos2017-07-19
| | | | | | | It can be accessed as ctx.genfiles_dir and should be printed as before for compatibility. PiperOrigin-RevId: 162360940
* Now that SkyKey is an interface, accept Iterable<? extends SkyKey>Gravatar ulfjack2017-07-19
| | | | | | | A subsequent CL makes TargetPatternKey implement SkyKey, and it's much nicer if I can pass lists of TargetPatternKey to the various Skyframe APIs. PiperOrigin-RevId: 162359843
* Implement toolchain resolution via constraint checks.Gravatar John Cater2017-07-19
| | | | | | | Part of #2219. Change-Id: I5777e9b6cafbb7586cbbfb5b300344fd4417513d PiperOrigin-RevId: 162359389
* Add --extra_toolchains flag to register additional toolchain labels.Gravatar John Cater2017-07-19
| | | | | | | Fixes https://github.com/katre/bazel/issues/4. Change-Id: I664aaeb0d2aa4f36ecd0f1a5f13b5d7f25dcc8d6 PiperOrigin-RevId: 162355466
* Fix #1027: XML test output missing for tests that timeoutGravatar philwo2017-07-19
| | | | | | The sandbox execution strategies were not passing the timeout grace period specified via --local_termination_grace_seconds, resulting in process-wrapper defaulting to just 5 seconds and linux-sandbox not using any grace period at all, instead directly SIGKILLing the child on timeout. PiperOrigin-RevId: 162349919
* CustomCommandLine: add emptiness checksGravatar laszlocsomor2017-07-19
| | | | | | | | | | | | | | | | | | | | | This is a semantic roll-forward of https://github.com/bazelbuild/bazel/commit/a76c94be7c56b93fc5a2f9ececfba7ac1f61f69c which was rolled back in https://github.com/bazelbuild/bazel/commit/33cd68e18f554b98194b4ce924580d3333ab9217 due to memory regressions. In this commit: - add @Nullable annotations to CustomCommandLine.Builder.add* methods where it makes sense - add Preconditions.checkNotNull for non-nullable arguments - add emptiness checks for Iterables in add(String, Iterable) style methods, to avoid adding the argument when the Iterable is empty and so the argument would not be followed by any values RELNOTES: none PiperOrigin-RevId: 162349842
* Report error when action_config for given C++ compile action is not definedGravatar hlopko2017-07-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 162344071
* Remove the unused class NoSuchConfiguredTargetException.Gravatar lberki2017-07-19
| | | | | | | It was apparently created by me in May 2011. RIP. RELNOTES: None. PiperOrigin-RevId: 162334525
* Add an option to remove the toolchain identifier from the name of the output ↵Gravatar lberki2017-07-18
| | | | | | | | | directory. This will probably need some more work so that there are no name clashes with e.g. Android output directory names, but let's take one step at a time. RELNOTES: None. PiperOrigin-RevId: 162328750
* Move ParsingFailureEvent reporting to TargetPatternFunctionGravatar ulfjack2017-07-18
| | | | | | | We're parsing the target pattern before we create the SkyKey, so all callers of the key creation also need to report this event. PiperOrigin-RevId: 162326973
* Add an undocumented option to remove the separation between the bin and ↵Gravatar lberki2017-07-18
| | | | | | | genfiles directories. RELNOTES: None. PiperOrigin-RevId: 162325236
* Fix Postable forwarding and replayGravatar ulfjack2017-07-18
| | | | | | | We were previously duplicate-posting Postable events posted to the Skyframe environment. PiperOrigin-RevId: 162323598
* Automated rollback of commit a76c94be7c56b93fc5a2f9ececfba7ac1f61f69c.Gravatar laszlocsomor2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Caused memory regression. *** Original change description *** CustomCommandLine.Builder: clean up its interface In this commit: - remove unused methods and classes - turn CustomCommandLine.ArgvFragment into an interface - remove the CustomCommandLine.TreeFileArtifactArgvFragment abstract class; it only had one remaining subclass - add @Nullable annotations where nulls are fine - add Precondition checks for non-nullable args - simplify the interface by removing add* methods that can be composed of other add* methods; this makes it easier to see... *** RELNOTES: none PiperOrigin-RevId: 162320031
* Small changes to skyframe package.Gravatar kush2017-07-18
| | | | PiperOrigin-RevId: 162288376
* Improve attribute and index error messages for targetsGravatar vladmos2017-07-18
| | | | | | | Instead of "object of type 'Target'" a representation of the target can be used for improved readability. PiperOrigin-RevId: 162267961
* Make AbstractBlazeQueryEnv closable, shutdown SkyQEnv executor on closeGravatar mschaller2017-07-18
| | | | | | | | Users of SkyQueryEnvironment ought to be able to shut down its executor when they're finished with it. RELNOTES: None. PiperOrigin-RevId: 162262117
* Make the @Option annotation depend on the java version of the tagging enums.Gravatar ccalvarin2017-07-18
| | | | | | | The option filters proto dependency can be removed from the OptionsParser. This is in response to option parser users that want to avoid the bazel-internal proto file in their dependencies. RELNOTES: None. PiperOrigin-RevId: 162249778
* Delete the "Predefined Python variables" page.Gravatar laurentlb2017-07-18
| | | | | | | | The page was incomplete and almost empty, and also redundant with https://docs.bazel.build/versions/master/skylark/lib/globals.html#PACKAGE_NAME RELNOTES: None. PiperOrigin-RevId: 162234689
* Update documentation for 'attr_definition' and rename it 'Attribute'.Gravatar laurentlb2017-07-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 162228252
* Do not use process-wrapper in RunCommand on Windows.Gravatar Philipp Wollermann2017-07-18
| | | | | | | | | | Fixes #1852. RELNOTES: None. Closes #3370. PiperOrigin-RevId: 162209884
* Dynamic transitions for controlling resource filteringGravatar Googler2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamically Configured Resource Filtering change 4/6 Add dynamic transitions for controlling resource filtering. These transitions will be called in the next few reviews. Specifically, one transition turns dynamically configured resource filtering on, and updates the dynamically passed resource filter to contain the current target's resource filtering settings. The other turns off dynamic filtering, including removing all filtering settings and transitioning to FilterBehavior.FILTER_IN_ANALYSIS. We apply the appropriate transition in getTopLevelPatchTransition: if dynamic filtering was not requested, no transition is made; if dynamic filtering was requested but would not be appropriate (either because multiple top-level targets would mean dynamic configuration would probably split the build graph, or because no resource filters were provided so dynamically propagating them would be a waste of time) we transition to static filtering, and, otherwise, we continue to use dynamic filtering but preserve the current target's filtering settings so they can be passed to its dependencies. These transitions will actually be called in the next review. RELNOTES: none PiperOrigin-RevId: 162209042
* Cleanup in Android/C++/Java providers documentationGravatar laurentlb2017-07-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 162205838
* Allow py_binary to be the executable of a Skylark action or anyGravatar Philipp Wollermann2017-07-18
| | | | | | | | | SpawnAction on Windows. RELNOTES: None. Change-Id: I2d926447511dab5fb804051abdbef9031cb089be PiperOrigin-RevId: 162201440
* Remove ParseFailureListener in favor of posting to EventBus directlyGravatar ulfjack2017-07-18
| | | | | | | We now have the ExtendedEventHandler, which is available in all the relevant code paths, so we just post the event directly. PiperOrigin-RevId: 162200923
* Automated rollback of commit 4594b7fd6c2516341cdd6e57f9eaaf22cf691f95.Gravatar buchgr2017-07-17
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** It breaks examples/tutorial on ci.bazel.build [1] with error: object of type 'Target' has no field 'objc'. [1] http://ci.bazel.io/view/Dashboard/job/Tutorial/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/1023/console *** Original change description *** AppleBinary and AppleStaticLibrary no longer propagate unwrapped ObjcProvider. This will prevent dependencies on apple_binary and apple_static_library from objc_library and other lower-level rules. RELNOTES: None. PiperOrigin-RevId: 162195726
* Internal changeGravatar Googler2017-07-17
| | | | PiperOrigin-RevId: 162194755
* Extend the SpawnRunner APIGravatar ulfjack2017-07-17
| | | | | | | | | | | | | - add an id for logging; this allows us to correlate log entries for the same spawn from multiple spawn runner implementations in the future - add a prefetch method to the SpawnExecutionPolicy; better than relying on the ActionInputPrefetcher being injected in the constructor - add a name parameter to the report method; this is in preparation for a single unified SpawnStrategy implementation - it's basically the last bit of difference between SandboxStrategy and RemoteSpawnStrategy; they're otherwise equivalent (if not identical) PiperOrigin-RevId: 162194684
* AndroidBusyBox: deprecate path-list-type flagsGravatar laszlocsomor2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit: - deprecates PathListConverter - removes ExistingPathListConverter because it was not used in production, only tests - deprecated List<Path> type flags that use PathListConverter - introduces new List<Path> type flags next to the deprecated ones that use @Options.allowMultiple and convert with PathConverter; the new and old lists are concatenated, yielding the flag value PathListConverter and all of its occurrences should be removed after 2018-01-31 (about 6 months from now, which is a safe enough timeframe for everyone to upgrade Bazel so it uses the new-style flags). Reason for deprecation is that colon-separated path lists don't work on Windows because paths have colons in them. Since the Android BusyBox is not intended to be executed by users but by Bazel only, there's no release notes necessary. See https://github.com/bazelbuild/bazel/issues/3264 RELNOTES: none PiperOrigin-RevId: 162193998
* remote: Lower the chances of a race condition in the remote upload.Gravatar Ola Rozenfeld2017-07-17
| | | | | | | | | | | | Lower the chances of triggering #3360. Immediately before uploading output artifacts, check if any of the inputs ctime changed, and if so don't upload the outputs to the remote cache. I profiled the runs on //src:bazel before vs. after the change; as expected, the number of VFS_STAT increases by a factor of 180% (!), but, according to the profiler, it adds less than 1ms to the overall build time of 130s. PiperOrigin-RevId: 162179308
* remote: Failed blob upload should close file handle.Gravatar buchgr2017-07-17
| | | | | | | | | | | Two cases: - The upload succeeds and the Chunker consumes all its data and closes the underlying data source. - The upload fails and the Chunker doesn't close the data source, and so we call reset() manually. RELNOTES: None. PiperOrigin-RevId: 162178032
* Doc typoGravatar brandjon2017-07-17
| | | | | RELNOTES: None PiperOrigin-RevId: 162135034
* ResourceFilter supports dynamically configured resource filteringGravatar Googler2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamically Configured Resource Filtering change 3/6 Resource filtering behaves somewhat differently when dynamically configured. Resources obtained from dependencies will have already been filtered and do not need to be filtered again. Resources that were filtered out do not need to be tracked since resource processing will never receive a reference to them anyway. Also, to make builds where ResourceFilter is dynamically configured, add equals and hashCode methods (otherwise, the configuration code throws a NullPointerException) and a global output prefix (otherwise, conflicts can occur). To ensure that the global output prefix (and the ResourceFilter object itself) is the same regardless of the ordering of filters in the android_binary, build the filters into a set, not a list, and sort them as part of creating the ResourceFilter object. This way, for example, objects built with filters "en,fr", "fr,en", and "en,en,fr" will all end up equal. Finally, rename the getFilteredResources method to better reflect its new role, and improve the isPrefiltering method to not try to prefilter if there are no filters. Add tests for all of this, and helper methods for all of those tests, including, most notably, a makeResourceFilter method that instantiates a ResourceFilter similarly to how it is actually created outside of tests (rather than directly calling the constructor) and a fake implementation of AttributeMap to support this. RELNOTES: none PiperOrigin-RevId: 162099178
* Fix java_toolchain.jvm_opts label expansion if javac is an aliasGravatar cushon2017-07-17
| | | | PiperOrigin-RevId: 162039650
* Add a java_toolchain.tools attributeGravatar cushon2017-07-17
| | | | | | | | for configuring additional Java compilation tools, which are added as inputs to javac and turbine actions and available for jvm_opts location expansion. PiperOrigin-RevId: 162036912
* AppleBinary and AppleStaticLibrary no longer propagate unwrapped ObjcProvider.Gravatar cparsons2017-07-17
| | | | | | | This will prevent dependencies on apple_binary and apple_static_library from objc_library and other lower-level rules. RELNOTES: None. PiperOrigin-RevId: 162013946
* Filter LocalResourceContainer and use it to get a filtered ResourceContainerGravatar Googler2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | Dynamically Configured Resource Filtering change 2/6 We need to filter LocalResourceContainer for dynamically configured resource filtering - it is an input to resource parsing for android_library targets. Filter it appropriately. Once it's being filtered, use it to build a filtered ResourceContainer, rather than building an unfiltered ResourceContainer and then filtering it. This means filtering gets done sooner, saving a bit of time and work, and isn't done twice, which would just be bad. To do this, we pass an unbuilt ResourceContainer.Builder into createApk, rather than a fully built one. Move the setAssetsAndResourcesFrom and setManifest calls to that builder, called every time, into createApk so that we only call them once. Also, initialize the ResourceFilter object when it's needed, rather than pass it down from the binary or library. This makes the code a bit cleaner, plus means library targets will pick up the dynamically configured information once that exists. RELNOTES: none PiperOrigin-RevId: 162007885
* Merge handleOptions into beforeCommandGravatar ulfjack2017-07-17
| | | | | | | Now that we have the options before calling beforeCommand, there's no need for a separate handleOptions method in the BlazeModule API. Remove it. PiperOrigin-RevId: 162002300
* Add new type descriptions for rule attribute documentation.Gravatar gregce2017-07-17
| | | | | | | | | Motivation: properly document config_setting.values. The license type description is terse. But that's an obscure feature we don't really want to focus attention on. PiperOrigin-RevId: 161998339
* Add the option filter enums in java, with equivalence check.Gravatar ccalvarin2017-07-17
| | | | | | | | | | In order to break out the proto dependency of the OptionsParser, add a java-only enum that users of the options parser can depend on, instead of requiring the dependency on the protobuf. The protocol buffer definition is kept in order to be used for command line reporting in the BEP, so a test is added to make sure that the two are kept in sync. Also add some clearer guidance for how to go about selecting, and adding, option categories and tags. Migrating the current uses of the proto enum to this one will happen in a follow-up change. PiperOrigin-RevId: 161971077
* Reserve certain action mnemonics so they can't be used from Skylark.Gravatar tomlu2017-07-17
| | | | | | | If a reserved mnemonic is used, it is mangled. RELNOTES: PiperOrigin-RevId: 161970885
* remote: Chunker.reset() should release resources.Gravatar buchgr2017-07-17
| | | | | RELNOTES: None. PiperOrigin-RevId: 161970540
* Clean up string representations for unknown objectsGravatar vladmos2017-07-17
| | | | | | | | Don't call the `toString` method on unknown objects as it potentially breaks hermeticity and determinism. Use a generic string like "<unknown object package.ClassName>" instead. PiperOrigin-RevId: 161970449
* Simplify exception handling in spawn strategiesGravatar ulfjack2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | The main change here is to only catch SpawnExecException in StandaloneTestStrategy, so all other exceptions simplify propagate up. As a result, Bazel no longer retries tests that fail with an exception, we only retry tests that actually ran, had a spawn result, and resulted in a UserExecException. That is probably what we want. Also do some cleanup: - Remove ExecException.timedOut; nobody was calling it (but there's still SpawnExecException.timedOut) - Remove SpawnActionContext.shouldPropagateExecException; all exceptions (except SpawnExecException) are now propagated by default - Remote the SandboxOptions from the SandboxStrategies; all sandboxing options are now handled by the underlying SpawnRunner implementations I'll send a followup CL to remove the UserExecException and EnvironmentalExecException types; the types don't do anything special, and there are no catch blocks in production code that catch one of these more specific types. This should fix #3322 by removing a bunch of special handling. PiperOrigin-RevId: 161960919
* Update the gRPC channels for remote caching and execution to use a ↵Gravatar olaola2017-07-17
| | | | | | | | | RoundRobin client side load balancer instead of the default PickFirst. A RoundRobin rotates between all addresses returned by the resolver, while PickFirst sends all traffic to the first address. This might help resolve some of the load problems we encountered (see https://github.com/grpc/grpc/issues/11704 for more details). TESTED=remote worker PiperOrigin-RevId: 161960008