aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Add --materialize_param_files option.Gravatar tomlu2018-06-19
| | | | | | | | | When set, any action parameter files are written locally upon action execution, even when the action is executed remotely. This is mainly useful for debugging. This option is effectively implied by --subcommands and --verbose_failures, as it is likely that the user is debugging actions when using these flags. RELNOTES: Add --materialize_param_files flag to write parameter files even when actions are executed remotely. PiperOrigin-RevId: 201225566
* Add more logging when executionPlatformConstraintsAllowed is set to PER_TARGETGravatar jcater2018-06-19
| | | | | | but the "exec_compatible_with" attribute is present. PiperOrigin-RevId: 201219412
* Delete switch for nested set serialization. It's fast enough to be on by ↵Gravatar janakr2018-06-19
| | | | | | default. PiperOrigin-RevId: 201218341
* Add an option to show verbose debugging logs.Gravatar brendandouglas2018-06-19
| | | | | | | | | | Turns out the event handler (BlazeCommandEventHandler) prints almost all event types, and I don't believe there's a way to tune it. We certainly don't want these messages printed to the console unless we're debugging the debugger, so turn them off by default. PiperOrigin-RevId: 201211355
* Put a trail into every SerializationException, not just NoCodecException, ↵Gravatar janakr2018-06-19
| | | | | | and have DynamicCodec add to it. It's very useful to have this trail available when debugging or whitelisting. PiperOrigin-RevId: 201205884
* Implement #equals and #hashCode for TargetPatternPhaseValue.Gravatar janakr2018-06-19
| | | | PiperOrigin-RevId: 201205388
* Let MessageLiteCodec handle UnknownFieldSet.Gravatar janakr2018-06-19
| | | | PiperOrigin-RevId: 201203706
* Make things easier to serialize: make constants constant, tag some lambdas. ↵Gravatar janakr2018-06-19
| | | | | | Get rid of a useless tag, because the Function being tagged is a concrete class, so won't be serializable. Will deal with it in a follow-up. Implement equality for BazelInfo. PiperOrigin-RevId: 201199255
* Make variable providers coming from the toolchains attribute shouldn't beGravatar jcater2018-06-19
| | | | | | | checked for restricted_to and compatible_with constraints, because they are part of the execution, not providing new dependencies. PiperOrigin-RevId: 201196891
* Make some Apple objects more serializable: tag constants as constant, tag ↵Gravatar janakr2018-06-19
| | | | | | lambdas as Serializable. PiperOrigin-RevId: 201191461
* Clarify that ErrorInfoValue is a NotComparableSkyValue because we don't ↵Gravatar janakr2018-06-19
| | | | | | expect equality, not because there's no implementation. PiperOrigin-RevId: 201191262
* C++: Refactors PyWrapCc to make it easier to migrate to SkylarkGravatar plf2018-06-19
| | | | | | | | | Rolls forward https://github.com/bazelbuild/bazel/commit/c720152ec1936a537c9519d522d3cb41d19cff77. This CL includes testing to make sure that linker parameters coming from every possible provider in Python rules is propagated. RELNOTES:none PiperOrigin-RevId: 201160720
* Add fields to CcToolchainFeatures.Feature and ↵Gravatar rosica2018-06-19
| | | | | | | | | | | CcToolchainFeatures.ActionConfig that are needed for FeatureConfiguration creation In the future CcToolchainFeatures will not be created from a CToolchain but from a CrosstoolInfo provider that will encapsule all relevant information from the CROSSTOOL. Feature and ActionConfig classes need to carry all the information that is currently obtained from CToolchain. Work towards issue #5380 RELNOTES: None. PiperOrigin-RevId: 201147336
* Ensure seq never formats output with decimals or using scientific notationGravatar cushon2018-06-19
| | | | | | | | as this isn't supported by `((... == 0))` below. See bazelbuild/bazel#5413 PiperOrigin-RevId: 201135798
* Stop holding on to the Action and ActionKeyContext in ↵Gravatar janakr2018-06-19
| | | | | | | | ActionConflictException. We can construct the exception message eagerly, since it is going to be thrown with very high likelihood in any case. The complex objects inside it made it hard to serialize. PiperOrigin-RevId: 201130522
* Remove support for --discard_actions_after_execution.Gravatar tomlu2018-06-18
| | | | | | | The memory savings from this flag are not worth the complexity, and it interferes with action restarting. RELNOTES: Remove support for --discard_actions_after_execution. PiperOrigin-RevId: 201077905
* Automated rollback of commit c720152ec1936a537c9519d522d3cb41d19cff77.Gravatar janakr2018-06-18
| | | | | | | | | | | | | | | | | *** Reason for rollback *** See linked bug. *** Original change description *** C++: Refactors PyWrapCc to make it easier to migrate to Skylark Rolling forward https://github.com/bazelbuild/bazel/commit/6c87715b8ac6b32e636ba307440e2b7362b10a48. When I first tried to roll forward this CL I missed one place where PyCcLinkParamsProvider.TO_LINK_PARAMS should have been called. The target //production/midas/config:client_config_pb builds fine now. RELNOTES:none PiperOrigin-RevId: 201070354
* Let ConfiguredRuleClassProvider decide whether to drop the analysis cache.Gravatar mstaib2018-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ConfiguredRuleClassProvider can specify a predicate which accepts an OptionsDiff and the new BuildOptions in order to make a decision on whether the given diff requires the analysis cache to be dropped. This predicate is only called if all of the following hold: * there was an old configuration collection (if not, the cache is not dropped because there wasn't one yet) * the old configuration collection is not exactly equal to the new configuration collection (if it is, the cache is not dropped because it definitely hasn't changed) * the old configuration collection has the same number of configurations as the new collection (if not, the cache is always dropped because experimental_multi_cpu has changed, definitely not a flag which should cause old analysis cache to stick around!) If all of these hold, the old target configurations are paired up with the new target configurations by index in the configuration collection, and each pair is diffed. The predicate is called with each diff and the corresponding new configuration's build options. If any of these invocations returns true, the cache is dropped. Otherwise, the cache is kept for the next build. No implementation of this predicate is actually supplied for this change, so the old behavior (always drop the cache if the configuration changes at all) holds. RELNOTES: None. PiperOrigin-RevId: 201050049
* Clean up uses of SkylarkList<String> and ast in toolchains parameters.Gravatar John Cater2018-06-18
| | | | | | | | | Change-Id: I3655868d34dd98f5cde084a61995dfae8e4b94c0 Closes #5374. Change-Id: I3655868d34dd98f5cde084a61995dfae8e4b94c0 PiperOrigin-RevId: 201032126
* Permit marking dirty/changed a node more than onceGravatar mschaller2018-06-18
| | | | | | | | | | | | This functionality will be useful for node restarting. More than one parent node may request the restart of a shared child node, and this should not fail. Instead, the returned MarkedDirtyResult indicates whether the dirtying was redundant, and the calling code can assert on that. RELNOTES: None. PiperOrigin-RevId: 201005663
* Make ConfiguredTargetValue a NotComparableSkyValue. Since no implementation ↵Gravatar janakr2018-06-18
| | | | | | of ConfiguredTarget implements equality, it's very much not comparable. PiperOrigin-RevId: 201004116
* Consider runfiles symlinks when computing Runfiles.getEmptyFilenames().Gravatar Benjamin Peterson2018-06-18
| | | | | | | | | | | | | | Runfiles.getEmptyFilenames() only considered the unconditional and pruning manifest artifacts for empty-file insertion. Actual manifest creation asks the empty files supplier for empty files over symlinks (but not root symlinks!), too. Change-Id: Ice69bbaa9e6169bff7ec5833ee7ef1b73049a4a7 Closes #5334. Change-Id: Ice69bbaa9e6169bff7ec5833ee7ef1b73049a4a7 PiperOrigin-RevId: 201002604
* Refactoring: uses OutputService for ActionFileSystem injectionGravatar shahan2018-06-18
| | | | | | Moves more Action-oriented from skyframe package, which has become very unwieldy, to action package. This is needed to avoid circular dependencies caused when build-base is needed for skyframe. PiperOrigin-RevId: 200996982
* Expose single_jar and bootclasspath in the java toolchain to skylark.Gravatar Googler2018-06-18
| | | | | | This would allow pulling these from the toolchain in kotlin rules. PiperOrigin-RevId: 200996334
* Make java_toolchain attribute Environment aware.Gravatar dbabkin2018-06-18
| | | | | RELNOTES:none: PiperOrigin-RevId: 200988244
* RepositoryFunction: depend on overrides, even if there is no ruleGravatar Klaus Aehlig2018-06-18
| | | | | | | | | | Not all bazel external repositories are generated by a rule (e.g., they might be unbound names with the expectation that on override binds them). Still, even those external repositories depend on changes to the repository override. Register this dependency. Change-Id: I900c94f969d08dec82c5776eff28337878379b5e PiperOrigin-RevId: 200974283
* Fix bug in NestedSetStore where racing deserializations could create ↵Gravatar janakr2018-06-16
| | | | | | multiple futures for the same fingerprint and add a test showing that racing serializations can result in duplicate writes. PiperOrigin-RevId: 200860099
* Remove topLevelConfigurationHook now that LIPO is goneGravatar gregce2018-06-15
| | | | PiperOrigin-RevId: 200801973
* Allow CppCompilationHelper to disable coverage instrumentationGravatar Googler2018-06-15
| | | | | RELNOTES=None PiperOrigin-RevId: 200800112
* ActionFS supports fast digests. Add test coverage for this and some file ↵Gravatar felly2018-06-15
| | | | | | | metadata operations. RELNOTES: None PiperOrigin-RevId: 200765925
* Remove "artifactOwnerConfiguration" now that LIPO is goneGravatar gregce2018-06-15
| | | | PiperOrigin-RevId: 200763653
* Support ActionFS opening files with append. Also, fix ActionFS notifying its ↵Gravatar felly2018-06-15
| | | | | | | metadata consumer multiple times per inline output. RELNOTES: None PiperOrigin-RevId: 200730252
* Remove LIPO supportGravatar hlopko2018-06-15
| | | | | RELNOTES: Support for LIPO has been fully removed. PiperOrigin-RevId: 200724578
* Move remaining BazelLibrary skylark functions to MethodLibraryGravatar cparsons2018-06-15
| | | | | | | | | Ultimately, we'll need to make the call on whether these functions belong as part of the build API or as part of skylark builtins. For now, we keep them as skylark builtins. (In either case, we'll want to migrate to @SkylarkCallable, but that's for a later change) RELNOTES: None. PiperOrigin-RevId: 200723605
* Don't propagate empty asset containersGravatar asteinb2018-06-15
| | | | | | | If asset containers are empty, simply discard them rather than propagating them up the dependency graph. We don't currently use merging output except at the top level, so we don't need any of this information. (If/when asset merging is redone, we'd need to redo this code anyway.) RELNOTES: none PiperOrigin-RevId: 200721055
* Add a bit more profiler coverageGravatar ulfjack2018-06-15
| | | | | | | | | | | | | | | | | | The intent is that the main thread has ~zero gaps in the profile (though there may still be small gaps due to the time between one try block and an immediately subsequent try block). We need to be careful not to wrap markPhase calls (or methods that call markPhase) in try blocks for the profiler - the Profiler requires that all markPhase calls happen at top level, and throws an exception if not. This should not have any performance impact - all of these are once per build, or at most once per module per build, and we don't expect a very large number of modules (and if we see an increasing number, we need to change the module API to not have to call every single module, but only those that are actually interested in certain events, maybe with an EventBus-based setup). PiperOrigin-RevId: 200712677
* Remove CcCompilationContext.TransitiveModuleHeaders#getTransitiveModules. ↵Gravatar cpeyser2018-06-15
| | | | | | This information is persisted for testing only, and considerably slows NestedSet serialization. PiperOrigin-RevId: 200710549
* sync: also report errorsGravatar Klaus Aehlig2018-06-15
| | | | | | | | If a failure occurs during the syncing of the external repositories, not only set the exit code, but also report the error message. Change-Id: I3a0e19039ab4444e811c8cff4e6f9b33331a0e02 PiperOrigin-RevId: 200709468
* Move the BlazeRuntime.initProfiler call to BlazeCommandDispatcherGravatar ulfjack2018-06-15
| | | | | | | | | | The intend is to move the profiler setup earlier in the startup sequence, so we can get more profiler coverage. Ideally, we'd setup the profiler immediately after getting the client call, but this is not currently possible due to the requirement that initialization and shutdown happen in pairs (otherwise the next command invocation crashes with an exception from the Profiler). PiperOrigin-RevId: 200707029
* Remove the removeHandler/releaseHandler pairsGravatar ulfjack2018-06-15
| | | | | | | | | | | | | | | | | | | | | | | They weren't actually doing anything. With default flags, createHandler never returns a FancyTerminalEventHandler, because that always gets wrapped in a RateLimitingEventHandler. Even so, under normal circumstances, the fancy terminal event handler always leaves the terminal in a valid state at the end of each printed line. We can only end up in a bad state if the blaze server is killed, but even then, this code wasn't doing anything because it didn't get to run. The only way to guarantee that the terminal is always in a valid state is to make sure that every stdout/stderr buffer we send to the client ends with a reset code sequence. The experimental ui handler is better at sending only complete buffers (we were previously using an auto-line flushing output stream, which didn't allow the event handler to reason about how much stuff got actually printed in a single write call). Anyway, I think we're in a better place now, and this code wasn't run, and if we want to fix it properly (if the switch to experimental_ui isn't sufficient), then we need to fix it elsewhere. PiperOrigin-RevId: 200699609
* Add the BuildConfigurationCollection to the AnalysisResultGravatar ulfjack2018-06-15
| | | | | | This is in preparation for interleaving config creation with loading+analysis. PiperOrigin-RevId: 200695071
* Reimplement AsynchronousFileOutputStream to use a writer threadGravatar ulfjack2018-06-15
| | | | | | | | | | | | | | | | | | | | | Background: the original code is implementing the OutputStream interface. Given a sequence of write calls, the code puts each of these writes into a queue. On the other side of the queue is an unbounded thread pool, which takes the writes off the queue one by one, and then does individual blocking writes with a fixed file offset. There are three problems with the original code: 1. Writes are sent to the Kernel one-by-one. Imagine if the incoming writes a single-byte writes, then we do one kernel call for every single byte. This is the worst case. 2. Due to multithreading, the writes can get reordered. In the worst case, the order is reversed, and the kernel flushes each write to disk individually. Since the writes are not aligned to disk block boundaries, each write has to first *read* the block from disk, overwrite a few bytes, and then flush the block back to disk. On a spinning platter, this is the worst possible sequence of operations: write a block, read the same block back, write the same block again, read the same block back, etc., with each operation having to wait for a full disk rotation. Note that this gets worse if there's high thread and / or disk contention, e.g., when running a build system in the background. 3. Due to the unbounded thread pool, it may end up creating a new thread for every single write (possibly as many as one per byte written). This is also the worst case, although it's probably negligible compared to 1+2. Compared to that, this change uses an in-memory buffer before sending writes to the kernel so non-block sized writes are batched, it writes sequentially, and it uses a single thread created at the start. A single thread should be more than able to fully saturate local disk I/O, so multi-threading should ~never be a improvement here. This might look different if we had perfectly aligned writes of an integer multiple of the disk block size to a distributed network file system or a local SSD raid. If you look at the clients of this class, that's definitely not the case: this code is primarily used for local file BEP transports - we wouldn't use local file BEP transports to write to a network file system, we'd use the BES instead. It's also used to write a couple of log files, also all local - otherwise we'd add the data to BEP. These are all unaligned, ~random-sized writes. If we created a lot of these files, then using a thread pool with fewer threads than files and using non-blocking I/O might be an improvement due to the reduction in thread count, but I think it's very unlikely that we'll ever need that complexity. PiperOrigin-RevId: 200694423
* Refactor BlazeRuntime.initProfilerGravatar ulfjack2018-06-15
| | | | | | | - reduce the parameters to the minimum required - change to void, move additional setup into the method PiperOrigin-RevId: 200692559
* Add a mechanism for build event protocol events to upload filesGravatar ulfjack2018-06-15
| | | | | | | | This should be a no-op, mostly replacing PathConverter with BuildEventArtifactUploader, since none of the implementations perform any upload yet. PiperOrigin-RevId: 200685325
* Remove SerializationConstants.VALIDATE_CONFIGURED_TARGET_VALUE, since ↵Gravatar cpeyser2018-06-14
| | | | | | ConfiguredTargetValue is no longer prohibitively slow. PiperOrigin-RevId: 200640971
* Fix shared actions that generate tree artifacts after the recent change to ↵Gravatar janakr2018-06-14
| | | | | | | | make Artifact#equals take owner into account (unknown commit). In the case that shared actions generate tree artifacts, the outputs of the second action do not include all the artifacts present in the results of the first action, because those artifacts were not known until execution. However, corresponding artifacts can be created easily enough, with the proper owners. Fixes #5396 PiperOrigin-RevId: 200640969
* Use single source of truth for symlinks and warn when deleting them.Gravatar mstaib2018-06-14
| | | | | | | | | | | | | | | | | | | | | After this change, Bazel prints a warning when --use_top_level_targets_for_symlinks is active and the destination of a symlink would be ambiguous. This also includes a refactoring of OutputDirectoryLinksUtils to use a single source of truth for all symlink operations. This results in a few small visible behavior changes: * Bazel used to delete a convenience symlink with the name of the workspace from the WORKSPACE file... but it didn't create it. * Bazel used to check for a convenience symlink named "includes" when pretty-printing paths... but it didn't create it. * Bazel used to ignore the existence of the "testlogs" symlink when pretty-printing paths... despite that it created it. * Bazel used to prioritize the execroot over the output base when pretty-printing paths... despite that the former contains the latter. RELNOTES: None. PiperOrigin-RevId: 200629863
* Enable automatic trimming of test configuration when entering non-test rules.Gravatar mstaib2018-06-14
| | | | | | | | | | | | | | Note that this is not sufficient to see caching between builds on its own; currently when any flag changes, the analysis cache is reset. A follow-up will turn off this behavior when only test flags change while trim_test_configuration is on. config_settings which examine test options are treated the same as test rules; that is, they can only be successfully analyzed at the top level or when connected to the top level by an unbroken chain of test rules. RELNOTES: None. PiperOrigin-RevId: 200614584
* Automated rollback of commit 1615da781db78b7a910daf89720189c2b2e73dbe.Gravatar Googler2018-06-14
| | | | | | *** Reason for rollback *** PiperOrigin-RevId: 200605975
* SerializationCheckingGraph checks all ConfiguredTargetValues.Gravatar cpeyser2018-06-14
| | | | PiperOrigin-RevId: 200593618