aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Do not NPE crash when C++ actions are not configured in crosstoolGravatar hlopko2017-07-07
| | | | | | | Show meaningful message instead. RELNOTES: None. PiperOrigin-RevId: 161196096
* Refactor RemoteSpawn{Strategy,Runner}Gravatar ulfjack2017-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make the RemoteSpawnRunner match RemoteSpawnStrategy functionality, including local fallback, remote caching, and execution. This is done so we can actually finish the migration to the SpawnRunner API, for which I've had a pending change for several months now. - Never throw StatusRuntimeException from the GrpcRemoteCache or the GrpcExecutor. We almost never do, since the Retrier catches them implcitly, so a number of catch blocks were already unreachable. Carefully document the cases where we still need to handle it. - RemoteSpawnStrategy / RemoteSpawnRunner no longer catch gRPC-specific exceptions; they should be able to handle any reasonable remote caching / execution implementation (except we don't have a common interface for GrpcRemoteExecutor yet), with no dependency on gRPC as such. Note that the RemoteSpawnStrategy class will actually go away after the SpawnRunner migration (eventually). - However, ensure that we _are_ actually throwing CacheNotFoundException; the retrier implicitly catches that also, so we need to manually unwrap from RetryException. - Don't call into the EventHandler from RemoteSpawnStrategy; instead, throw an exception with the message, and let the higher levels handle the reporting (we only allow this for exception + local fallback, for which there's no good reporting API right now). PiperOrigin-RevId: 161195666
* Clean up string representations for attr and attr.*Gravatar vladmos2017-07-07
| | | | | | | | | This change is a part of global string representations cleanup using the --incompatible_descriptive_string_representations flag, however the change to attr and attr.* is not affected by the flag because string representations of these objects used to contain nondeterministic information (memory addresses). PiperOrigin-RevId: 161192934
* remote: Add a SingleSourceBuilder to the Chunker.Gravatar buchgr2017-07-07
| | | | | | | | Prepare the Chunker for an upcoming refactoring, where it will no longer support multiple input sources and digest filtering. RELNOTES: None. PiperOrigin-RevId: 161189759
* Avoid relying on System.out/err going to the terminalGravatar ulfjack2017-07-07
| | | | | | Use an appropriate EventHandler instead. PiperOrigin-RevId: 161189061
* Move CommandEnvironment creation and beforeCommand call after options parsingGravatar ulfjack2017-07-07
| | | | | | | | Instead, introduce a new commandInit method in the BlazeModule API. The primary semantic change here is that beforeCommand is no longer called if options parsing fails or if we're outside a workspace for commands that require one. PiperOrigin-RevId: 161188760
* Cache flaky tests (remove the cachable flag from test result data)Gravatar ulfjack2017-07-07
| | | | | | | | | | | | | | | | | | | The cachable flag was only set to false for flaky tests. Before this CL, we did not cache flaky tests on subsequent runs, instead rerunning them, even though this is both very expensive and inconsistent with our normal handling, which is to cache passes but not errors. If cache_test_results is enabled, we now also cached timed out test results. If cache_test_results=auto (the default), we now also cache flaky tests. We still do not cache failed tests; the TestRunnerAction checks if the previous test result was marked as passed (which also applies to flaky tests, but not to failed or timed-out tests). Also add some unit tests. PiperOrigin-RevId: 161187950
* Improve error message when calling a builtin function with wrong typeGravatar laurentlb2017-07-07
| | | | | | | Error message is simpler and doesn't show the type of all arguments. RELNOTES: None. PiperOrigin-RevId: 161187134
* remote: Make RetryException aware of gRPC's StatusException.Gravatar buchgr2017-07-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 161179228
* Plumb some information about the location of the JVM through ↵Gravatar lberki2017-07-07
| | | | | | | | | | | | | | | JavaRuntimeProvider instead of Jvm if a java_runtime rule is used. There are a few things standing in the way of removing package loading from JvmConfigurationLoader: - The JAVABASE/JAVA Make variables, which are a function of the contents of the package with the JVM. The plan is to make JavaRuntime a MakeVariableProvider and add an attribute to rules that do Make variable evaluation to tell which Make variables they need - The path to the Java binary is exported to Skylark through the configuration fragment. We'll need to export an attribute to Skylark that can be used to depend on the JVM, then do the three-step dance to use that instead of the configuration and figure out what to do if --javabase is not a label. - Jvm#getJavaExecutable() has a bunch of call sites. They need to be adjusted individually. RELNOTES: None. PiperOrigin-RevId: 161176462
* Replace Transitions.configurationHook with equivalent rule class transitions.Gravatar gregce2017-07-07
| | | | | | | This removes the last dynamic dependency on the static configuration transition table. PiperOrigin-RevId: 161162272
* Automated rollback of commit 9000e61fc1737444392ffe251727e8331fab3cf2.Gravatar Googler2017-07-07
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed handling of pch, so this should work again *** Original change description *** Automated rollback of commit 29ec1b89989db411d2038e2df8657b6435f80403. *** Reason for rollback *** Breaks the classroom_ios TAP project [1] in the presence of --experimental_objc_crosstool=all, which was added to the global .blazerc last week. [1] [] *** Original change description *** Change ProtobufSupport to use CrosstoolCompilationSupport if experimental_objc_crosstool=all PiperOrigin-RevId: 161159846
* Switch from using set/getPchFile on CompilationArtifacts to a doNotUsePch ↵Gravatar Googler2017-07-07
| | | | | | option on CompilationSupport. In the process correctly respect whether to use the pch file under crosstool compilation mode. PiperOrigin-RevId: 161156717
* Remove FragmentOptions' addAllLabels and getAllLabels and friends.Gravatar mstaib2017-07-07
| | | | | | | | These are now dead code - configuration dependencies are loaded by Skyframe and do not need to be listed ahead of time - and were only ever used in tests. PiperOrigin-RevId: 161146721
* Factor out BuildConfigurationCollection.Transitions.getDynamicTransition.Gravatar gregce2017-07-07
| | | | | | | | | | | | This is a legacy dependency on the configuration transition table, which is only needed for static configurations. Dynamic configurations didn't actually use anything in that table: this was just a convenience interface that could have equally been defined somewhere else. So this cl defines it somewhere else. There's still one last dependency: Transitions.configurationHook. We'll tackle that in a followup cl. PiperOrigin-RevId: 161141650
* Exclude //external targets from //...Gravatar kchodorow2017-07-07
| | | | | | | | | | Fixes #3307 and #1606. The problem was that TargetPatternResolver was trying to figure out if repositories were tagged as "manual," but repository rules don't have a "tags" field. Repository rules shouldn't be included by //... generally. TargetPatternResolver was just ls-ing // to find all the "packages," so this removes external/ from consideration. PiperOrigin-RevId: 161134437
* Clean up string representations for select valuesGravatar vladmos2017-07-07
| | | | | | | | If --incompatible_descriptive_string_representations is passed, select values are converted to strings using `str`, `repr` and `print` functions differently: "select(...)" instead of "selector(...)". PiperOrigin-RevId: 161129809
* Clean up string representations for aspectsGravatar vladmos2017-07-07
| | | | | | | | If --incompatible_descriptive_string_representations is passed, aspects are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, without leaking information that shouldn't be accessible). PiperOrigin-RevId: 161116840
* Make build_event_stream_test more robustGravatar aehlig2017-07-07
| | | | | | | | | | | | | ...by makeing it independent of the test executor; in particular, do not rely on the wrapper to create the test.xml files if the test fails to do so, and do not assume a particular name (e.g., remote execution might decide to call the files "remote_1.xml"). Also, make the constructor of VisibilityErrorEvent public, to allow extensions of bazel to generate visibility errors as well. RELNOTES: None PiperOrigin-RevId: 161087809
* Clean up string representations for functionsGravatar vladmos2017-07-07
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, functions and rule classes are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, without leaking information that shouldn't be accessible). PiperOrigin-RevId: 161087777
* Remove JavaIdeInfoProvider.Gravatar dslomov2017-07-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 161086496
* Remove showName argument in FunctionSignature, it was always true.Gravatar laurentlb2017-07-07
| | | | | | | Also, replace noTypeDefined with typeDefined. RELNOTES: None. PiperOrigin-RevId: 161079981
* Remove apple_watch2_extension ruleGravatar cparsons2017-07-07
| | | | | RELNOTES: Remove apple_watch2_extension build rule. Users should be using the skylark watchos_application and watchos_extension rules. https://github.com/bazelbuild/rules_apple has details. PiperOrigin-RevId: 161079942
* Move the remote initialization code out of RemoteSpawnStrategyGravatar ulfjack2017-07-07
| | | | | | | | This is in preparation for making it use the RemoteSpawnRunner, as part of which it will no longer need to do that. Also, Java style says you shouldn't do work in the constructor, and it's better dependency injection. PiperOrigin-RevId: 161071134
* Prohibit multiple load() statements from appearing on the same lineGravatar brandjon2017-07-07
| | | | | | | | This is an incompatible change, but it's an obvious bug. RELNOTES[INC]: Fixed a bug whereby multiple load() statements could appear on the same line PiperOrigin-RevId: 161070399
* Android tests: prepare tests for parameter filesGravatar laszlocsomor2017-07-06
| | | | | | | | | | | | Prepare tests for an upcoming change where some Android actions will use a parameter file, because they expect command line flags with lists of files and the list separators don't work on Windows. See https://github.com/bazelbuild/bazel/issues/3264 RELNOTES: none PiperOrigin-RevId: 161064058
* Simplify the ActionInputFileCacheGravatar ulfjack2017-07-06
| | | | | | | | | Add a single getMetadata method (matching MetadataHandler), and rewrite everything in those terms. This is in preparation for merging ActionInputFileCache and MetadataHandler. PiperOrigin-RevId: 161053535
* Fix SkylarkDict.castSkylarkDictOrNoneToDict to return a Map.Gravatar jcater2017-07-06
| | | | PiperOrigin-RevId: 161034828
* Delete unused reuseJavaCompileActionsFromProtoLibrary.Gravatar carmi2017-07-06
| | | | | | | The flag was an unannounced roll-out flag, and nobody should have a reason to pass it manually, so no announcement is made. RELNOTES: None PiperOrigin-RevId: 161006423
* Create top-level configs dynamically: period.Gravatar gregce2017-07-06
| | | | | | | | | | | | | | | Before this change, top-level configs were still built statically, then cloned into dynamic configs to run the actual build. After this change, no static configuration should ever be created in a dynamically configured build. We're still keeping support for --experimental_dynamic_configs=off a bit longer to provide easy reversion on any bad surprises. But barring that we'll quickly move toward making --experimental_dynamic_configs=off a no-op, then ripping out Bazel's static configuration logic. PiperOrigin-RevId: 161005150
* Add a default for defaultsToSelf so dynamic transitions don't have to worry ↵Gravatar gregce2017-07-06
| | | | | | | | | | about it. This is only required because PatchTransition extends Attribute.Transition, which requires it. But it's only used for static configurations. So PatchTransition's implicit requirement is pointless and confusing. PiperOrigin-RevId: 161005131
* Remove the ToolchainConstructor class and change uses to be either aGravatar John Cater2017-07-06
| | | | | | | | | Label or a ToolchainInfo provider. Part of #2219. Change-Id: Ia09070717f54eea10e1ab0303253714b58768548 PiperOrigin-RevId: 160995546
* Fix expand_location to correctly use TransitiveInfoCollection instead ofGravatar John Cater2017-07-06
| | | | | | | | | the too-specific AbstractConfiguredTarget. Fixes #3309. Change-Id: Id614bb3b27c2ea164e4f87a4c1a9caa247f1980c PiperOrigin-RevId: 160991475
* Make 'platform_type' a mandatory attribute.Gravatar cparsons2017-07-06
| | | | | | | RELNOTES: 'platform_type' is now a mandatory attribute on apple_binary and apple_static_library rules. If this change breaks your build, feel free to add platform_type = 'ios' to any apple_binary and apple_static_library targets in your project, as this was the previous default behavior. PiperOrigin-RevId: 160989393
* Improve the ToolchainInfo provider and add more data.Gravatar John Cater2017-07-06
| | | | | | | Part of #2219. Change-Id: Ie235d0a75fc50746331b20a7f2060e6d49ae48cb PiperOrigin-RevId: 160982987
* Fix LocalRepositoryLookupFunction to normalize paths so they are compared ↵Gravatar John Cater2017-07-06
| | | | | | | | | properly. Part of #2811. Change-Id: I15da53d1f6ec7f4a41f5d14fdd9dafd5ad82f9fc PiperOrigin-RevId: 160982624
* Require LValues to have at least one variable.Gravatar laurentlb2017-07-06
| | | | | | | | | | | | In other words, we now forbid these: [] = [] () = () _, [] = f() RELNOTES[INC]: lvalues must have define at least one variable (i.e. we forbid `[] = f()`). PiperOrigin-RevId: 160981283
* Assume crosstools that don't have 'no_legacy_features' feature need patchingGravatar hlopko2017-07-06
| | | | | | | | | | | | | Right now there are 2 ways how to control crosstool patches. If there is 'no_legacy_features' feature defined, no patching will be performed. If there is not, then depending on whether any c++ action_config is defined one set of patches is applied, or other set of patches is applied. It's a mess, and in the most cases, crosstools that do not define 'no_legacy_features' need the full patching. This cl fixes the crosstools that need the partial patching. RELNOTES: Crosstool patches are only applied if the toolchain doesn't define 'no_legacy_features' feature. PiperOrigin-RevId: 160979463
* RELNOTES: Add option for Android specific grte_topGravatar Googler2017-07-06
| | | | PiperOrigin-RevId: 160974656
* Rewrite blob upload to use temporary filesGravatar ulfjack2017-07-06
| | | | | | | | | | | | | | Previously, it was allocating in-memory buffers for upload, which caused it to run out of memory on large file uploads (or on many small uploads running simultaneously). Unfortunately, we don't create the temporary file in the right location (due to separation of the BlobStore from the ByteStreamServer), so we copy the file again to write it to the OnDiskBlobStore, which isn't ideal. There'll need to be another BlobStore API change to make that work, when the InMemoryBlobStore is gone. PiperOrigin-RevId: 160974550
* Try to clarify "unaffected by subinclude," and also stop mentioning ↵Gravatar cpovirk2017-07-06
| | | | | | | subinclude :) RELNOTES: None. PiperOrigin-RevId: 160974476
* Handle problematic resource qualifiers in references to individual resourcesGravatar Googler2017-07-05
| | | | | | | | | ResourceFilter already handles problematic qualifiers in the resource_configuration_filters attribute. Also handle them in references to individual resources. RELNOTES: none PiperOrigin-RevId: 160969753
* Do not pass ruleKind from Java sandwich/aspects.Gravatar dslomov2017-07-05
| | | | | | | This gives non-sensical values in most cases. RELNOTES: None. PiperOrigin-RevId: 160959188
* Clean up string representations for labelsGravatar vladmos2017-07-05
| | | | | | | | | | | If --incompatible_descriptive_string_representations is passed, labels are converted to strings using `repr` differently: `Label("//package:name")` instead of `"//package:name"` This CL doesn't affect representations of other object types but provides the necessary infrastructure for it. PiperOrigin-RevId: 160955284
* Change the SimpleBlobStore API to use Input/OutputStreamsGravatar ulfjack2017-07-05
| | | | | | | This avoid having to load all the data into memory at once in most cases, especially for large files. PiperOrigin-RevId: 160954187
* Remove ide_build_info command.Gravatar dslomov2017-07-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 160951982
* Use the same data structure for native and Skylark providers.Gravatar dslomov2017-07-05
| | | | | | | | | The memory cost of adding Skylark provider is now the same as native. Skylark providers (declared and legacy) benefit from the same shape-sharing optimization as native providers. RELNOTES: None. PiperOrigin-RevId: 160944263
* Make 'load' a keywordGravatar laurentlb2017-07-05
| | | | | | | RELNOTES[INC]: `load` is now a language keyword, it cannot be used as an identifier PiperOrigin-RevId: 160944121
* Automated rollback of commit 480d6038905b3c8de09a362e2759fc6b8abe634c.Gravatar twerth2017-07-05
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks tests in current Blaze nightlies, see b/63296317 *** Original change description *** Add minSdkVersion optimization to Blaze. This optimization reduces the size of Android apps that use Proguard by ~0.2 - 0.3% depending on the minSdkVersion. RELNOTES: None. PiperOrigin-RevId: 160930942
* implement py_runtime ruleGravatar yiyu2017-07-05
| | | | | | | | | | * A user can use the py_runtime by `--python_top` flag, where the py_runtime can contain either: + an absolute path of a Python interpreter + a checked-in Python interpreter * A user can also use `--python_path` to point to a Python interpreter in an absolute path directly. PiperOrigin-RevId: 160901921