aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Bash,runfiles: add testsGravatar Laszlo Csomor2018-04-23
| | | | | | | | | | | | | | | | | | The runfiles library can now discover where the runfiles are. Also remove the shebang line from the runfiles library. This script should never by executed on its own but be sourced by other Bash scripts. See https://github.com/bazelbuild/bazel/issues/4460 RELNOTES[NEW]: Bash,runfiles: use the new platform-independent library in `@bazel_tools//tools/bash/runfiles` to access runfiles (data-dependencies). See https://github.com/bazelbuild/bazel/blob/master/tools/bash/runfiles/runfiles.bash for usage information. Closes #5071. Change-Id: I94557133e76ecc927646d109e2611d711c363cdc PiperOrigin-RevId: 193923870
* C++: Expose functionality needed for cc_embed_data Skylark implementationGravatar plf2018-04-23
| | | | | RELNOTES:none PiperOrigin-RevId: 193919970
* HttpDownloader: also cache files downloaded without provided hashGravatar Klaus Aehlig2018-04-23
| | | | | | | | | | | | | | | | | Even if downloading a file without a predicted hash, add it to the cache. This step is necessary to avoid redownloading when we switch to resolved WORKSPACES. Starting from a plain URL, the file is downloaded and the hash is added to the resolved version of the rule. Then we still want the resolved form of the rule (which still has different arguments) to download the same file again. Even before the design of resolved WORKSPACES is implemented, this caching is useful for the manual workflow: take the hash that is printed for every file downloaded without predicted hash and manually add it to the parameters of the rule. Then we prefer not to redownload the file again. Change-Id: I90eefa9efed7c47514cc481dc09d9e938efa5a39 PiperOrigin-RevId: 193907109
* Update bazel_toolchains in Bazel's WORKSPACE file to latest release.Gravatar philwo2018-04-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 193906990
* Repository cache: add a put method determining the key itselfGravatar Klaus Aehlig2018-04-23
| | | | | | | | | | Add a new put method to the repository cache, that computes the cache key itself. The key is returned, so it can be reused without having to recompute it. This is a convenient interface for caching a file that was downloaded without prior knowledge of its hash. Change-Id: I6ac844f4166bf64498b87e483896d155df35475e PiperOrigin-RevId: 193889444
* SpawnAction.setShellCommand: expect shell pathGravatar laszlocsomor2018-04-23
| | | | | | | | | | | | | | | | | | | | | | | SpawnAction.setShellCommand(String) now expects the shell interpreter's path as an argument. This change enables two things: - rules can report an error if the shell is missing - SpawnAction no longer has to know about a default shell The new ShToolchain class will later also be responsible for retrieving the active shell toolchain (added in https://github.com/bazelbuild/bazel/commit/81ed3add408adb20bddbc3ba1818c65806738dc5). This change brings Bazel closer to not depend on the shell unless it has to (e.g. to run shell scripts). See https://github.com/bazelbuild/bazel/issues/4319 RELNOTES: none PiperOrigin-RevId: 193885943
* Update Error Prone versionGravatar Liam Miller-Cushon2018-04-23
| | | | | | Change-Id: Iba6fa9cbee4d9801cf95463558aa7606bd0b1d78 Closes #5070.
* Add BazelCrashUtils to make it easier to crash the JVM when uncaught ↵Gravatar janakr2018-04-20
| | | | | | exceptions are detected in async worker threads. PiperOrigin-RevId: 193725871
* Remove overlap between the blazerc and bazelrc names.Gravatar ccalvarin2018-04-20
| | | | | | | | Bazel now has its own subclass of StartupOptions to specify bazel-only options. This is needed for https://github.com/bazelbuild/bazel/issues/4502. RELNOTES(INC): No longer accepts --blazerc or --[no]master_blazerc, accepts bazelrc name only. PiperOrigin-RevId: 193718297
* aar_import doesn't export AndroidSkylarkApiProviderGravatar asteinb2018-04-20
| | | | | | | | aar_import probably should give IDEs the same information as other rules, but it doesn't at the moment. Stop exporting the corresponding provider. RELNOTES: none PiperOrigin-RevId: 193701950
* Fix asset processing bugGravatar asteinb2018-04-20
| | | | | | | | | | We need to pass primary asset and resource artifacts to processing, not just resources. This was introduced as part of my recent migration. In my defense, this migration was needed exactly to avoid situations like this (ResourceContainer.getArtifacts does not just return resource artifacts like you might expect it to). RELNOTES: none PiperOrigin-RevId: 193693868
* Expose new methods in CcToolchainProvider to eventually replace skylark ↵Gravatar juliexxia2018-04-20
| | | | | | callables that depend on CToolchain in CppConfiguration. PiperOrigin-RevId: 193690345
* Update backward-compatibility.md with missing flag docsGravatar brandjon2018-04-20
| | | | | RELNOTES: None PiperOrigin-RevId: 193677877
* Blaze: add --high_priority_workers flag.Gravatar Googler2018-04-20
| | | | | | | | | | | When two or more instances of high priority workers are running, no other worker execution may start. Tweak WorkerSpawnRunner. Only reserve resources for a worker after it has been obtained from the pool. This allows us to block waiting for high priority workers to have finished before resources are reserved. RELNOTES: Add --high_priority_workers flag. PiperOrigin-RevId: 193672343
* Optionally suppress ThinLTO indexing for all linkstatic targetsGravatar Googler2018-04-20
| | | | | | | | | | | | | | | This extends the scalability fix in https://github.com/bazelbuild/bazel/commit/8c5e290dfab3cab378a9ca107ecdd6267403cd4b to optionally apply to all statically linked targets. Some test invocations end up building non-testonly cc_binary that are in the transitive data deps of a test, and can lead to huge numbers of LTO backend jobs for those test invocations. With this change, the global blazerc can enable this feature for "blaze test". This can end up subsuming the thin_lto_linkstatic_tests_use_shared_nonlto_backends feature. However, it might be useful to keep that one as it can be the default for all blaze builds (in case anyone wants to just build and not run their tests). RELNOTES: None PiperOrigin-RevId: 193667161
* Don't add -u flag to local remote worker docker command on Windows.Gravatar Googler2018-04-20
| | | | | | | | | | | | | | | | | -u doesn't currently make sense for Windows: https://github.com/docker/for-win/issues/636#issuecomment-293653788 The local remote worker happens to sometimes work on Windows because we would frequently (always?) hit the timeout here (but recently this hasn't been the case for me): https://github.com/bazelbuild/bazel/blob/fa36d2f48965b127e8fd397348d16e991135bfb6/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/ExecutionServer.java#L323 When we don't hit the timeout (so "id -u" succeeds, and the "-u" flag is passed to docker), we get an error like this: ``` Error response from daemon: container 06851b64e09bab5a930bfb706892785b24c7538c1a7be826fef315ab8e62c117 encountered an error during CreateProcess: failure in a Windows system call: The user name or password is incorrect. (0x52e) ``` The method for detecting Windows is the best I could find, similar to other isWindows functions in Bazel. RELNOTES: None. PiperOrigin-RevId: 193666199
* Allow repository rules to return a valueGravatar Klaus Aehlig2018-04-20
| | | | | | | | | | | | | ...in preparation of the change towards resolved workspaces, where a source-like rule is supposed to return the information needed to make it reproducible. At the moment, the value is ignored (it is just printed back to the user), but it allows rule authors to prepare for the upcoming change. RELNOTES: repository rules are no longer restricted to return None. Change-Id: I1b3bdc7b02a957f00c9846bcb0ee6b7e09343d72 PiperOrigin-RevId: 193664946
* Remove logic from CppConfiguration that is repeated in CppToolchainInfoGravatar Googler2018-04-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 193660672
* Make action_config.tools include crosstool top path by defaultGravatar hlopko2018-04-20
| | | | | | | | | | | We always prepend crosstool top path anyway, so let's create Tool instances with the already prepared path. I don't expect this affects memory usage since we don't have many cc_toolchain targets in the graph. RELNOTES: None PiperOrigin-RevId: 193660445
* Flip the default to --direct_run to true.Gravatar lberki2018-04-20
| | | | | RELNOTES: "bazel run" now lets one run interactive binaries. The BUILD_WORKSPACE_DIRECTORY and BUILD_WORKING_DIRECTORY environment variables indicate the working directory and the workspace root of the Bazel invocation. Tests are provided with an approximation of the official test environment. PiperOrigin-RevId: 193659165
* C++: Wraps CcExecutionDynamicLibrariesInfo inside CcLinkingInfo.Gravatar plf2018-04-20
| | | | | RELNOTES:none PiperOrigin-RevId: 193657227
* Update to latest checker framework dataflow versionGravatar Liam Miller-Cushon2018-04-20
| | | | | | Change-Id: If88b194d33ec9a847759e9e5cf3cf2019a2a7533 Closes #5062.
* Bring back --copts to linkstamp compile actionsGravatar hlopko2018-04-20
| | | | | | | | Unintentional sideeffect of https://github.com/bazelbuild/bazel/commit/119d8ecfba898799a9ad39eb756fa0247739a4a6 was that linkstamp compile action stopped receiving flags from --copt (blaze option). This cl fixes that. RELNOTES: None. PiperOrigin-RevId: 193655939
* Fix up all the tests to work with "blaze run --direct_run".Gravatar lberki2018-04-20
| | | | | | | | | In particular, update run_test so that the little test binary used to check ANSI escape code stripping explicitly marks the beginning of its output and delete a bunch of tests run RunCommandTest that verified the output of the binary. They are not relevant anymore now that the output is not piped through the server. Also drive-by fix a few linter issues in RunCommand. RELNOTES: None. PiperOrigin-RevId: 193655720
* Fix artifacts uploaded to GitHub as part of final releases.Gravatar philwo2018-04-20
| | | | | | | | We accidentally removed the .deb file, even though it's supposed to be uploaded and we didn't remove the .sig/.sha256 files of the artifacts that are *not* supposed to be uploaded. This change fixes that. PiperOrigin-RevId: 193651950
* Remove use of bare Immutable{List,Map,Set} Builder classes.Gravatar jcater2018-04-20
| | | | | | Always use the more-qualified class name for clarity at the site of use. There are too many classes named Builder. PiperOrigin-RevId: 193649193
* C++: Wraps CcRunfilesInfo inside CcLinkingInfo.Gravatar plf2018-04-20
| | | | | | | This simplifies the exposure to Skylark. It also helps by not forcing us to expose to Skylark providers that may eventually be deleted. RELNOTES:none PiperOrigin-RevId: 193645766
* Extract CcCommon.configureFeaturesOrThrowEvalExceptionGravatar hlopko2018-04-20
| | | | | | | | | This method will be available to Skylark. Native rules will use the wrapped version in CcCommon.configureFeaturesOrReportRuleError. The error message shown in case of conflicting features was modified slightly. RELNOTES: None. PiperOrigin-RevId: 193639182
* Remove JavaCompilationArgsHelperGravatar cushon2018-04-20
| | | | PiperOrigin-RevId: 193637350
* C++: Exposes Skylark configuration field called STLGravatar plf2018-04-20
| | | | | | | | This field will be needed by C++ rules re-written in Skylark. This change has to be checked in before the field itself can be used from Skylark. RELNOTES:none PiperOrigin-RevId: 193632184
* Thread more information through CcToolchainProvider for ↵Gravatar hlopko2018-04-20
| | | | | | | | | | CcCommon.configureFeatures The goal is to enable creation of feature configuration without the rule context. This will enable us to have cleaner API for this in Skylark. RELNOTES: None PiperOrigin-RevId: 193630386
* Change private method to static to underline that it is not intended to useGravatar dbabkin2018-04-20
| | | | | | | reference to `this and its internal state. RELNOTES:none PiperOrigin-RevId: 193629392
* Remove use of bare Immutable{List,Map,Set} Builder classes.Gravatar jcater2018-04-19
| | | | | | Always use the more-qualified class name for clarity at the site of use. There are too many classes named Builder. PiperOrigin-RevId: 193624381
* Remove use of bare Immutable{List,Map,Set} Builder classes.Gravatar jcater2018-04-19
| | | | | | Always use the more-qualified class name for clarity at the site of use. There are too many classes named Builder. PiperOrigin-RevId: 193579440
* Add the capability to register a trimming RuleTransitionFactory.Gravatar mstaib2018-04-19
| | | | | | | | | | This RuleTransitionFactory will be applied to all targets after other transitions, and is intended to be used to manually trim the configuration based on tagging of that target. This is a stopgap feature until automatic trimming of configuration can be implemented. RELNOTES: None. PiperOrigin-RevId: 193573013
* Simplify the signature of getSkylarkImportLookupFunctionForInliningGravatar shreyax2018-04-19
| | | | PiperOrigin-RevId: 193564550
* Add --debug-mode to aapt2 invocations when building without -c opt.Gravatar corysmith2018-04-19
| | | | | RELNOTES: None PiperOrigin-RevId: 193562885
* Add warning to registerDependencies javadocGravatar shreyax2018-04-19
| | | | PiperOrigin-RevId: 193559600
* Move CTQE methods into a more organized order and update some javadocs. No ↵Gravatar juliexxia2018-04-19
| | | | | | actual code changing going on here. PiperOrigin-RevId: 193559578
* Reduce the state kept in OptionProcessor.Gravatar jmmv2018-04-19
| | | | | | | | | | | | | | | Make the list of rc files a local variable as it need not be a class attribute, and drop the unused rcoptions_ field. This is a trivial refactoring and the remaining code is still too confusing. It'd be worth splitting OptionProcessor in two pieces: OptionProcessor to exclusively keep the virtual ParseOptions method and no state, and a new ParsedOptions type to act as the immutable return value of ParseOptions. This would decouple all state mutations. RELNOTES: None. PiperOrigin-RevId: 193557347
* Make some links absoluteGravatar brandjon2018-04-19
| | | | | | | | | This was breaking an internal version of the documentation, though the public version worked correctly. Now it works both ways. Also link directly to flag instead of section. RELNOTES: None PiperOrigin-RevId: 193554278
* Introduce PackageErrorMessageValueGravatar mschaller2018-04-19
| | | | | | | | | | This CL introduces a new intermediate SkyValue type, PackageErrorMessageValue, to be used by RecursivePkgFunction. RecursivePkgValue will now have a direct dep on PackageErrorMessageValue rather than PackageValue. RELNOTES: None PiperOrigin-RevId: 193549158
* Logging the spawn graph on demand. First step on #4891.Gravatar olaola2018-04-19
| | | | | | | | This is a very heavy and slow option by design. It will be enabled only when a user wants to debug their build, most frequently to compare the step-by-step results of two builds. TESTED: manually on various rules, including directories. RELNOTES: None PiperOrigin-RevId: 193539034
* Fix error message for proguard_apply_dictionary.Gravatar Googler2018-04-19
| | | | | RELNOTES: Fixed error message for proguard_apply_dictionary. PiperOrigin-RevId: 193538106
* Introduce NestedSetStore, which persists information used for NestedSet ↵Gravatar cpeyser2018-04-19
| | | | | | serialization. PiperOrigin-RevId: 193536486
* Update ApkSubject to use the AndroidCompiledDataDeserializer for proto apks.Gravatar corysmith2018-04-19
| | | | | | | Minor fixes to the AndroidCompiledDataDeserializer RELNOTES: None PiperOrigin-RevId: 193535766
* Consolidate handling of jar files in depsGravatar cushon2018-04-19
| | | | PiperOrigin-RevId: 193533061
* Add the --pseudo-localize flag to resource compilation, gated by the ↵Gravatar corysmith2018-04-19
| | | | | | | | | --generatePseudoLocale flag. Cleaned up the CompileLIbraryResourcesAction to use the Aapt2ConfigOptions. RELNOTES: PiperOrigin-RevId: 193525850
* Refactor where rc files are controlled.Gravatar ccalvarin2018-04-19
| | | | | | | In preparation for https://github.com/bazelbuild/bazel/issues/4502, make OptionProcessor::GetRcFiles contain the logic for both the user bazelrcs and the master bazelrcs. RELNOTES: None PiperOrigin-RevId: 193521683
* Make "run --direct_run" always use an absolute path for $0.Gravatar lberki2018-04-19
| | | | | | | This is so that the runfiles directory can always be found. RELNOTES: None. PiperOrigin-RevId: 193514152