aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* 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
* Improve error message for invalid srcjar inputsGravatar cushon2018-06-17
| | | | | | | Fixes #5418 RELNOTES: N/A PiperOrigin-RevId: 200934846
* 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
* Add Missing RobotoDraft-700 font to docsGravatar Branton Horsley2018-06-15
| | | | | | | | Fixed bug where \<strong\> tags were being improperly rendered Closes #5414. PiperOrigin-RevId: 200789831
* Fail when resources use invalid java identifiers.Gravatar corysmith2018-06-15
| | | | | RELNOTES:None PiperOrigin-RevId: 200766836
* ActionFS supports fast digests. Add test coverage for this and some file ↵Gravatar felly2018-06-15
| | | | | | | metadata operations. RELNOTES: None PiperOrigin-RevId: 200765925
* Remove the connect-to-server dots at server startup.Gravatar ccalvarin2018-06-15
| | | | | | | | Replace with an update at most every 10 seconds if we are still trying to connect. TESTED: Tested manually that this does print every 10 minutes if the server is prevented from connecting. RELNOTES: None. PiperOrigin-RevId: 200764279
* Remove "artifactOwnerConfiguration" now that LIPO is goneGravatar gregce2018-06-15
| | | | PiperOrigin-RevId: 200763653
* Update add_dep binary suggested by ImportDepsCheckerGravatar cushon2018-06-15
| | | | PiperOrigin-RevId: 200760220
* Remove LipoMode and LipoModeFlags from CROSSTOOLGravatar hlopko2018-06-15
| | | | | RELNOTES: None. PiperOrigin-RevId: 200747338
* 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
* Include injecting rule kind in add_dep commandsGravatar cushon2018-06-15
| | | | | | add_dep uses this information for j_p_l rules. PiperOrigin-RevId: 200721230
* 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
* Adding a tool to parse the execution logs.Gravatar olaola2018-06-15
| | | | | | | | For now, the tool simply displays the log as text. TESTED=ran it RELNOTES: A tool to parse the Bazel execution log. PiperOrigin-RevId: 200718299
* 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
* shell tests: tag tests with "no_windows"Gravatar Laszlo Csomor2018-06-15
| | | | | | | | | | | | | | Tag all tests in //src/test/shell/bazel:* that do not run on Windows yet with "no_windows". See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I9823621d5ba4fc02bafe731c17bb7f32785c3b47 Closes #5408. Change-Id: Ic3b9e8f96221ceff2ea33bfefa2814ba869af1ab PiperOrigin-RevId: 200707716
* repository_rules.md: update documentation on return valuesGravatar Klaus Aehlig2018-06-15
| | | | | | | | | Since commit 97132c0925031e1b1fb8e9e5dde2233daef9d97b, repository rule implementations are allowed to return other values than `None`. Describe the currently supported values and their intended meaning. Change-Id: I63dbbff4b232b36861aa2a6cfdc69352fa971f4d PiperOrigin-RevId: 200707564
* 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
* git_repository: return actual commitGravatar Klaus Aehlig2018-06-15
| | | | | | | | | | | | | | Using that repository rules now may return a non-None value, make git_repository return the arguments that make the rule reproducible; in particular, return the actual commit (instead of a tag) and the date of the commit, so support shallow clones. The added test also demonstrates how the `bazel sync` command together with `--experimental_repository_resolved_file` can be used to replay an earlier state of external dependencies. Change-Id: Ifa1cfdfdb5eb299a15b9d0ec7d285dc84c0bcdc0 PiperOrigin-RevId: 200705705
* 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
* Change -lgcov with --coverageGravatar elenairina2018-06-15
| | | | | | | in Bazel osx CROSSTOOL. -lgcov is not supported on macOS. See #5128. RELNOTES: None. PiperOrigin-RevId: 200691758
* shell, testenv.sh, BUILD: remove unused targetGravatar Laszlo Csomor2018-06-15
| | | | | | | | | Change-Id: I1039371e326dc260f2e70b32c9f4e2fd0dc0d7a6 Closes #5395. Change-Id: I002ba4f0944594ab62a7dd7a3ed4b4e7438328c0 PiperOrigin-RevId: 200686443
* 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
* Remove fixed point config expansion.Gravatar ccalvarin2018-06-14
| | | | | | | Deprecates the flag, though it continues to exist as a no-op so that users get a warning before errors. RELNOTES: --noexpand_configs_in_place is deprecated. PiperOrigin-RevId: 200572053
* Create an ImmutableTableCodec.Gravatar mjhalupka2018-06-14
| | | | PiperOrigin-RevId: 200561008
* Expose new methods in CcToolchainProvider to eventually replace skylark ↵Gravatar juliexxia2018-06-14
| | | | | | callables that depend on CToolchain in CppConfiguration. PiperOrigin-RevId: 200559893
* Skylark Pretty Printer: shorten empty listGravatar Klaus Aehlig2018-06-14
| | | | | | | | | | | | | | When pretty printing a Skylark value, lists are presented as the opening bracket on a line by itself, each entry on its own line, and the closing bracket again on its own line. While this generally improves readability, for the empty list this is not the case, as the expression [] can easily be understood at a glance. In fact, the additional line even makes the outer structure harder to see, as it is spread over even more lines. Therefore, shorten the printing of the empty list to be on a single line. Change-Id: I032d1550b1f99bce47dbec7e77a4d5c6656d78a1 PiperOrigin-RevId: 200558784
* Introduces a BAZEL_JAVAC_OPTS environment variable to the bootstrap build ↵Gravatar Googler2018-06-14
| | | | | | | | with empty default value to keep the script behavior unchanged. javac is not given a large enough max heap on Raspberry Pi 3. This change but allows the user to override the setting. RELNOTES: The BAZEL_JAVAC_OPTS environment variable allows arguments, e.g., "-J-Xmx2g", may be passed to the javac compiler during bootstrap build. This is helpful if your system chooses too small of a max heap size for the Java compiler during the bootstrap build. PiperOrigin-RevId: 200557606
* Add missing space.Gravatar spomorski2018-06-14
| | | | PiperOrigin-RevId: 200555806
* shell,tests: use Bash runfiles library in one testGravatar Laszlo Csomor2018-06-14
| | | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/4930 Change-Id: I148c0b1e4baa8ff44d86a6ee196bea7e9058320f Closes #5387. Change-Id: Iba32f21ff6cad1b538c72cfd08ce24846843c124 PiperOrigin-RevId: 200554084
* Skylark debugging protocol: remove conditional breakpoints, don't include ↵Gravatar brendandouglas2018-06-14
| | | | | | | | | | | | | | | | | | | | | frames in thread paused events. I started implementing conditional breakpoints server-side in unknown commit, but: - client-side implementations seem more common in debugging protocols - IntelliJ in particular has great support for client-side conditional breakpoints, but poor support for server-side - it's unnecessary extra complexity for the server -- simple line breakpoints + evaluation requests already give us conditional bps. Also removing frames from thread paused events. It results in poor performance for stepping and pausing (in which we get frame info for potentially dozens of threads), and again isn't usual for debuggers. Finally, ignore breakpoints when performing a client-requested evaluation. PiperOrigin-RevId: 200547972
* Support unconditional fetching of repositoriesGravatar Klaus Aehlig2018-06-14
| | | | | | | | | | | Make all external repositories depend on an additional SkyValue controllable via commands, so support unconditional fetching of all external repositories, as it is needed by the the `sync` command. Improves on #5175, provides a work around for #4907. Change-Id: I30033614c1a2fad3f1363b85ff69cf92f697c255 PiperOrigin-RevId: 200543985