aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Remove the 3-arg minimum on shell actionsGravatar cparsons2018-08-15
| | | | | RELNOTES: None. PiperOrigin-RevId: 208855272
* Have DigestMap support multiple hash functions.Gravatar tomlu2018-08-15
| | | | | RELNOTES: None PiperOrigin-RevId: 208837641
* Filter out events from analysis when constructing execution-phase values in ↵Gravatar janakr2018-08-14
| | | | | | | | | | Skyframe. This avoids some unnecessary iteration over already-emitted events that can show up in profiles, and allows us to store execution-phase values a bit more compactly, since we don't need to carry around wrapper objects and nested sets everywhere. This crucially depends on the fact that we can't build a target in the execution phase without first having analyzed it in a separate Skyframe call. Skyframe normally propagates all events/posts up the graph because it must be able to emit them if a user requests a node that only transitively depends on the node that emitted an event. However, because we do analysis in a separate Skyframe call, any warnings/posts associated with the analysis nodes will be emitted then, and we don't need to propagate them into execution. PiperOrigin-RevId: 208767078
* Create new config module that is responsible for creating BuildSetting ↵Gravatar juliexxia2018-08-14
| | | | | | | | | | descriptor objects. Build settings are units of configuration i.e. a key/value pair of a setting (e.g. cpu) and a value (e.g. ppc). A build setting descriptor is used to describe what kind of build setting a skylark rule is (if any at all). The BuildSettingDescriptor implementation of the API describes two facets of the build setting rule: the type of the value and whether or not the setting is settable on the command line. The methods exposed here will eventually be hooked up to a new parameter in the <code> rule() </code> function. Validation for these restrictions will also happen in a later CL attached to the same bug. PiperOrigin-RevId: 208669663
* test-wrapper: add empty impl + Bazel flagGravatar Laszlo Csomor2018-08-14
| | | | | | | | | | | | | | | | | | | | | | | This commit adds: - the skeleton implementation of the Windows native test wrapper - a depenency on the native test wrapper from test rules, through the new $test_wrapper rule attribute - the --windows_native_test_wrapper Bazel flag, which is currently a no-op See https://github.com/bazelbuild/bazel/issues/5508 Change-Id: I8df95c8ce8bab53c51c257698ec95416065a836e Closes #5854. Change-Id: I2ffc78bceec5dd867af775b5878f105fa87c3dba PiperOrigin-RevId: 208650699
* Add experimental option to do add local cpu usage values to the JSON profile.Gravatar twerth2018-08-14
| | | | | RELNOTES: None PiperOrigin-RevId: 208646319
* Add exports attribute to proto_library.Gravatar twerth2018-08-14
| | | | | | | Note that it is currently only used by the java_proto_library family of rules (if enabled per flag). RELNOTES: None PiperOrigin-RevId: 208601730
* Order Skyframe evaluations in a priority queue, with all children of a given ↵Gravatar janakr2018-08-13
| | | | | | | | node having the same priority, later enqueueings having higher priority, re-enqueued nodes having highest priority, and new root nodes having lowest priority. Experimentally, this can save significant RAM (1.4G in some builds!) while not affecting speed. Also do a semi-drive-by deleting ExecutorFactory parameter to AbstractQueueVisitor, since it was always AbstractQueueVisitor.EXECUTOR_FACTORY. PiperOrigin-RevId: 208560889
* Fix MultisetSemaphore.Gravatar nharmata2018-08-13
| | | | | | | | | We use a fixed version of the previous algorithm. See the comments for details. Fancier algorithms exist. I thought of a cool one that makes use of BatchKeyedLocker (would give me an excuse to revive it, heh), but fancy algorithms would be overkill. As noted in the initial commit of NaiveMultisetSemaphore, performance isn't critical. RELNOTES: None PiperOrigin-RevId: 208560559
* Add easy access to MessageDigests in DigestHashFunctionGravatar ccalvarin2018-08-13
| | | | | | | Move the message-digest cloning to DigestHashFunction and out of Fingerprint, to make it possible to configure Fingerprint to use different hash functions. We keep the default MD5 for now, we'd like it to use the global default but want to isolate the configuration change from any change adding potential contention. RELNOTES: None. PiperOrigin-RevId: 208502993
* Add new class to create cpu usage time series.Gravatar twerth2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208462186
* bazel: handle proto_src_root when dealing with proto includes, generated ↵Gravatar Googler2018-08-13
| | | | | | | | | | files and C++ headers This change completes the handling of proto_src_root when it comes to inclusion of protos, generating the proto files in the right place and adding the generated headers to the include paths. WANT_LGTM=elenairina RELNOTES: None. PiperOrigin-RevId: 208457740
* Refactoring of SkyFunctionEnvironment to iterate over events/postables only ↵Gravatar janakr2018-08-10
| | | | | | | | | | | | when they're actually being put into a committed value. The previous behavior submitted deps' events twice, when the dep was added and when the node finished building. The intention is to build on this refactoring to cut off events/postables across the analysis-execution boundary, so that actions are not carrying around nested sets of warnings coming from their configured targets. This will be safe because to execute an action, we must already have analyzed its configured target, so the warning would have been emitted there. As can be seen from the changed test, this is not a pure behavior no-op. We will now emit cached events slightly later, on value committal, rather than on first dep declaration. This should not be an issue: since the events are cached, the user must have already seen them on a prior build, so the delay should not be important. Inversely, we now report events slightly more quickly during bubbling up, since we report them at each stage, as opposed to just at ParallelEvaluator evaluation completion. PiperOrigin-RevId: 208316502
* PiperOrigin-RevId: 208245798Gravatar mjhalupka2018-08-10
|
* Do not crash when attempting to upload a tree artifact.Gravatar tomlu2018-08-10
| | | | | | | These show up as directories. Filter these out and return null from the path converter, which should cause omission of those files from any build events. RELNOTES: None PiperOrigin-RevId: 208244910
* Automated rollback of commit 9374ecf94ce44e8bc56e68678cb512abf4cf9ce2.Gravatar felly2018-08-10
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with deduplication of traversals and regression test. RELNOTES: None *** Original change description *** Automated rollback of commit 39974a43abdd32e3a1acbc7da945b08da9983e4e. *** Reason for rollback *** b/112458627 *** Original change description *** Allow skyframe-aware actions to pass partial results through ActionExecutionContext. Remove FilesetProvider. PiperOrigin-RevId: 208231719
* Persist mappings from original command line patterns to expanded labels in ↵Gravatar Googler2018-08-10
| | | | | | TargetParsingCompleteEvent. PiperOrigin-RevId: 208217102
* Automated rollback of commit 39974a43abdd32e3a1acbc7da945b08da9983e4e.Gravatar felly2018-08-10
| | | | | | | | | | | | | *** Reason for rollback *** b/112458627 *** Original change description *** Allow skyframe-aware actions to pass partial results through ActionExecutionContext. Remove FilesetProvider. PiperOrigin-RevId: 208213955
* Introduce a retriever for logging handler properties.Gravatar arostovtsev2018-08-10
| | | | | | | | | | | We want a way for Bazel to find a logging handler's current log file without direct dependencies on the exact handler class. We do this with an abstract parent class whose concrete child class (to be used as a singleton) will be given in startup_options, i.e. in the same place as the server logging configuration. RELNOTES: None. PiperOrigin-RevId: 208171084
* Batch all DependencyResolver#getTarget calls. This leads to some duplicate ↵Gravatar janakr2018-08-09
| | | | | | iteration, but that should be cheap, while requesting packages sequentially can hurt... PiperOrigin-RevId: 208126130
* Allow skyframe-aware actions to pass partial results through ↵Gravatar felly2018-08-09
| | | | | | | | ActionExecutionContext. Remove FilesetProvider. PiperOrigin-RevId: 208111251
* Add test case showing off existing deadlock bug. There's no deterministic & ↵Gravatar nharmata2018-08-09
| | | | | | | | | | perfect way to expose the bug without e.g. adding hooks inside the implementation, but the test case I added seems to fail very consistently. RELNOTES: None PiperOrigin-RevId: 208060959
* In AbstractSkyFunctionEnvironment, don't check for filtered exceptions in ↵Gravatar janakr2018-08-08
| | | | | | the common case of no exceptions. We were already mostly tracking missing dependencies in the subclasses, so there's no need to check for missing dependencies here. PiperOrigin-RevId: 207934220
* Improve error messaging for constraints violations.Gravatar gregce2018-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Break up dense lines with clearer pretty-printing. 2) When a violation happens because of a select(), mention both the target with the select (as before) *and* the dep that the select() chose. 3) Integrate this messaging into --target_environment violations, which currently provide no info about the root cause. Examples: ------------------------------------- select() + compatible_with violation: ------------------------------------- Before: ERROR: /workspace/testapp/BUILD:41:1: in cc_binary rule //testapp:top: the current command-line flags disqualify all supported environments because of incompatible select() paths: environment: //constraints:p removed by: //testapp:midlib (/workspace/testapp/BUILD:28:1) After: ERROR: /workspace/testapp/BUILD:41:1: in cc_binary rule //testapp:top: the current command line flags disqualify all supported environments because of incompatible select() paths: environment: //constraints:p removed by: //testapp:midlib (/workspace/testapp/BUILD:28:1) which has a select() that chooses dep: //testapp:glib which lacks: //constraints:p. ------------------------------------- select() + --target_environment=//constraints:p violation: ------------------------------------- Before: ERROR: This is a restricted-environment build. - //testapp:top does not support required environment //constraints:p After: ERROR: This is a restricted-environment build. //testapp:top does not support: environment: //constraints:p removed by: //testapp:midlib (/workspace/testapp/BUILD:28:1) which has a select() that chooses dep: //testapp:g which lacks: //constraints:p Fixes: #5795 PiperOrigin-RevId: 207910308
* Re-enable BytecodeTypeInferenceTestGravatar cushon2018-08-08
| | | | | | Bazel's ASM was updated in 3a711882dcbb3af8709844bde501ac6fca44ea7d. PiperOrigin-RevId: 207909203
* Don't convert InterruptException to EvalException in struct field call ↵Gravatar Benjamin Peterson2018-08-08
| | | | | | | | | | | expressions. This is probably only a theoretical problem, since a blocking struct field is probably a very bad idea. Closes #5132. Change-Id: Ie84a78ab4d9ce215f2806ac49bf8911de6959930 PiperOrigin-RevId: 207902766
* Remove ValidatedAndroidData interfaceGravatar asteinb2018-08-08
| | | | | | | | Now that ValidatedAndroidResources is the only implementation, we can just use that instead. RELNOTES: none PiperOrigin-RevId: 207900844
* Remove support for explicitly setting java_toolchain.encoding to UTF-8Gravatar cushon2018-08-08
| | | | PiperOrigin-RevId: 207891979
* Remove ResourceContainerGravatar asteinb2018-08-08
| | | | | | | | | ValidatedAndroidResources is now the only implementation of ValidatedAndroidData, so we can also clean up some code. (The actual interface will be cleaned up in the next few changes.) RELNOTES: none PiperOrigin-RevId: 207891778
* Improve NaiveMultisetSemaphore#estimateCurrentNumUniqueValues by having it ↵Gravatar nharmata2018-08-08
| | | | | | | use Semaphore#availablePermits. I have no idea why I didn't do this initially. RELNOTES: None PiperOrigin-RevId: 207883650
* Automatic code cleanup.Gravatar Googler2018-08-08
| | | | PiperOrigin-RevId: 207882126
* Put main repo remapping behind a flag.Gravatar dannark2018-08-07
| | | | | RELNOTES: None PiperOrigin-RevId: 207801155
* Remove uses of java_toolchain.encodingGravatar cushon2018-08-07
| | | | PiperOrigin-RevId: 207734653
* Remove decoupling flag from BazelGravatar asteinb2018-08-07
| | | | | | | | | | This flag is turned on everywhere. Remove it. There's a lot of dead code hidden behing this flag; will remove it in a series of upcoming changes. RELNOTES: none PiperOrigin-RevId: 207732126
* Temporarily disable the CommandUsingProcessWrapperTest system time upper ↵Gravatar ruperts2018-08-07
| | | | | | | bound check as it is intermittently failing under very heavy load. RELNOTES: None. PiperOrigin-RevId: 207716645
* Pass cc_toolchain location to FeatureConfigurationGravatar rosica2018-08-07
| | | | | | | Paths to tools in CROSSTOOL are either absolute or relative to the CROSSTOOL location (which is the same as cc_toolchain location). As in the future CROSSTOOL will be gone, and the new skylark rule that will replace CROSSTOOL will not have to be in the same location as cc_toolchain, we need to pass information to FeatureConfiguration about the location of the cc_toolchain in use, so we can calculate the workspace relative paths to the tools. RELNOTES: None. PiperOrigin-RevId: 207695703
* Add configuration for android data binding v2.Gravatar corysmith2018-08-06
| | | | | RELNOTES: None PiperOrigin-RevId: 207592136
* Order tree artifacts.Gravatar felly2018-08-06
| | | | | | | Fixes #5686. RELNOTES: None PiperOrigin-RevId: 207559658
* Move maybeAddProvider to be part of the EnabledDataBindingContext.Gravatar corysmith2018-08-06
| | | | | RELNOTES: None PiperOrigin-RevId: 207553449
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-08-06
| | | | | | | | This is in preparation for deleting CcLinkParamsStore. Not all calls to setCcLinkparamsStore have been removed in this CL. RELNOTES:none PiperOrigin-RevId: 207516944
* Remove the functionality to do ahead-of-time #include extraction as a separateGravatar Googler2018-08-06
| | | | | | | action. RELNOTES: None. PiperOrigin-RevId: 207516074
* Moved all external calls to isDataEnabled to DataBindingContext and made it ↵Gravatar corysmith2018-08-03
| | | | | | | private. RELNOTES: None PiperOrigin-RevId: 207335684
* Reduce and centralize databinding context instances.Gravatar corysmith2018-08-03
| | | | | | | Due to some of the vagaries of skylark and multiple entry points, the databinding context is currently updated by the parse action. RELNOTES: None PiperOrigin-RevId: 207333111
* Introduce the DataBindingContext interface as part of centralizing the data ↵Gravatar corysmith2018-08-03
| | | | | | | binding processing pipeline. RELNOTES: None PiperOrigin-RevId: 207312398
* Make BES tolerant to duplicate artifacts in output groups.Gravatar tomlu2018-08-03
| | | | | | | It is possible to create duplicate artifacts with different owners, so we have to tolerate this when uploading files. RELNOTES: None PiperOrigin-RevId: 207302014
* Pass digest to Chunker construction when available.Gravatar tomlu2018-08-03
| | | | | | | | | * Refactor Chunker constructor to a builder to reduce constructor overload. * Pass digest into this where we have it * Redo ensureInputsPresent to not lose the missing digests during processing so we can pass them to the Chunker constructor. RELNOTES: None PiperOrigin-RevId: 207297915
* Introduce a new file-based logging handler for Bazel.Gravatar arostovtsev2018-08-03
| | | | | | | | | | | | | | | | | | | | | | It provides a number of features that we want and whose combination cannot be accomplished using the standard FileHandler: * Using a different filename per server process, by putting a timestamp and process ID in the filename. This means Bazel will no longer overwrite its log when the server is restarted, making it easier for developers and maintainers to diagnose issues. * Putting the hostname and username in the filename (useful when running on a shared network filesystem). * Automatically setting a symlink to the latest log file, ensuring that the latest log can still be found under the usual Bazel server log path. * Providing an API for getting the filename of the current log file, for use by Bazel itself. * Cleaning up old log files when their total size exceeds a set limit. This commit only introduces the handler; its usage in Bazel will be enabled by a follow-up commit. RELNOTES: None. PiperOrigin-RevId: 207274587
* C++: Change Skylark API whitelisting to be part of flag.Gravatar plf2018-08-03
| | | | | | | | This uses SkylarkSemantics now instead of the C++ configuration. The flag is: --experimental_cc_skylark_api_enabled_packages RELNOTES:none PiperOrigin-RevId: 207235431
* Change the list of rc files accepted.Gravatar ccalvarin2018-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The old list was, in order: - %workspace%/tools/bazel.rc (unless --nomaster_bazelrc) - %binary_dir%/bazel.bazelrc (unless --nomaster_bazelrc) - system rc, /etc/bazel.bazelrc or in %ProgramData% for Windows (unless --nomaster_bazelrc) - the first of the following gets called the "user" bazelrc - path passed by flag --bazelrc - %workspace%/.bazelrc - $HOME/.bazelrc The new list is hopefully a bit more consistent, as: - system rc (unless --nosystem_rc) - workspace, %workspace%/.bazelrc (unless --noworkspace_rc) - user, $HOME/.bazelrc (unless --nohome_rc) - command-line provided, passed as --bazelrc or nothing if the flag is absent. This list removes two less than useful locations, duplication in the Workspace directory, and the rc next to the bazel binary. This location made sense at Google but is generally nonsensical elsewhere so we are removing it. It also stops the user local rc file from being overriden by passing in a custom file in --bazelrc. In both old and new, --ignore_all_rc_files disables all of the above. For a transition period, any file that you would have loaded but was not read will cause a WARNING to be printed. If you want the old file to still be read without moving its location, you can always import it into one of the new standard locations, or create a symlink. Closes #4502, except for cleanup to remove the warning after a transition period of 1 Bazel version has passed. RELNOTES[INC]: New bazelrc file list. PiperOrigin-RevId: 207189212
* Thread a path resolver through target/aspect complete event.Gravatar tomlu2018-08-02
| | | | | | | At the moment, an identity path resolver is passed. This will later be replaced by a contextual path resolver. RELNOTES: None PiperOrigin-RevId: 207138772