aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
Commit message (Collapse)AuthorAge
* remote: add a ByteStreamBuildEventArtifactUploaderGravatar buchgr2018-07-12
| | | | | | | | | | | | | | | This change allows local files referenced by the BEP/BES protocol to be uploaded to a ByteStream gRPC service. The ByteStreamUploader is now implicitly also used by the BES module which has a different lifecycle than the remote module. We introduce reference counting to ensure that the channel is closed after its no longer needed. This also fixes a bug where we currently leak one socket per remote build until the Bazel server is shut down. RELNOTES: None PiperOrigin-RevId: 204275316
* Simplify (hopefully) usage of modules during input discovery. Goals:Gravatar Googler2018-07-12
| | | | | | | | | | | - Don't duplicate usedModules into additionalInputs (this shouldn't be necessary). - Use ImmutableLists instead of ImmutableSets where possible to reduce memory consumption. - Use set operations to make the code more readable. RELNOTES: None. PiperOrigin-RevId: 204268489
* Move output option down to specific query option.Gravatar twerth2018-07-12
| | | | | | | | They're different anyway and we will need this to set a different default value for aquery. RELNOTES: None PiperOrigin-RevId: 204259933
* Automated rollback of commit f4a3dd9b8124dc7b2795f89e6700881b66371e4f.Gravatar lberki2018-07-12
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks //devtools/blaze/integration:{[]_test_test,gdp_validation_test} and at leats //contentads/supermixer/server:supermixer . *** Original change description *** Refactor handling of API generation in JavaPluginInfoProvider Instead of keeping two copies of state for the API-generating and non-API-generating cases, create a 'JavaPluginInfo' abstraction to contain all state for each case, and then keep two copies in the top-level JavaPluginInfoProvider provider. This will make it easier and less error-prone to add additional state to the provider. PiperOrigin-RevId: 204258844
* Automatic ClangTidyReadability code cleanup.Gravatar Googler2018-07-12
| | | | PiperOrigin-RevId: 204254234
* Store the hashCode as an Int instead of a string in FilesetOutputSymlink, andGravatar kush2018-07-11
| | | | | | | | delay the string conversion till we actually write the manifest file. This might get some memory savings after adding some in unknown commit. RELNOTES: None PiperOrigin-RevId: 204216582
* Set the version of a computed node to the max of its child versions rather ↵Gravatar janakr2018-07-11
| | | | | | | | | | | | | | | | | than the graph version when that is feasible. * It's not feasible when the computation accesses outside state, i.e. is non-hermetic, so see below. * It's also more complicated (and not worth the trouble) when the computation is taking place just for the error status. Have SkyFunctionName declare whether the function it corresponds to is hermetic or non-hermetic. Only non-hermetically-generated SkyValues can be directly marked changed, and non-hermetic SkyFunctions have their values saved at the graph version, not the max of the child versions. All SkyFunctions are hermetic except for the ones that can be explicitly dirtied. A marked-hermetic SkyFunction that has a transient error due to filesystem access can be re-evaluated and get the correct version: if it throws an IOException at version 1 and then, when re-evaluated at version 2 with unchanged dependencies, has a value, the version will be version 1. All Skyframe unit tests that were doing non-hermetic things to nodes need to declare that those nodes are non-hermetic. I tried to make the minimal set of changes there, so that we had good incidental coverage of hermetic+non-hermetic nodes. Also did some drive-by clean-ups around that code. Artifacts are a weird case, since they're doing untracked filesystem access (for source directories). Using max(child versions) for them gives rise to the following correctness bug: 1. do a build at v1 that creates a FileStateValue for dir/ at v1. Then at v2, add a file to dir/ and do a build that consumes dir/ as a source artifact. Now the artifact for dir/ will (incorrectly) have v1. Then at v1, do that build again. We'll consume the "artifact from the future". However, this can only have an effect when using the local action cache, since the incorrect value of the artifact (the mtime) is only consumed by the action cache. Bazel is already broken in this way (incremental builds don't invalidate directories), so this change doesn't make things worse. PiperOrigin-RevId: 204210719
* Make the FileArtifactvalue of generated targets available via the ↵Gravatar kush2018-07-11
| | | | | | | | | | | | | | FilesetOutputSymlink whenever available. In this change I'm simply plumbing the FileArtifactValue we requested within RecursiveFilesystemTraversalFunction to the FilesetOutputSymlink. This does not work when the targets are output directories (or symlink to output dirs). The main scenarios this happens is when: 1. Fileset depends on the output dir created by a genrule. 2. Fileset depends on a GoAppengineBinary which creates an output dir. 3. Fileset depends on another Fileset in the non-recommended way (Fileset.entry.files = [<another_fileset>]) instead of the recommended way (FilesetEntry.srcdir = <another_fileset>). RELNOTES: None PiperOrigin-RevId: 204209612
* Omit parts of BEP events (like stdout, stderr) when the associated artifact ↵Gravatar tomlu2018-07-11
| | | | | | | uploader cannot upload a particular file. RELNOTES: None PiperOrigin-RevId: 204167372
* Documentation for Android NDK support with BazelGravatar jingwen2018-07-11
| | | | | | | Example workspace: https://github.com/bazelbuild/examples/pull/66/files RELNOTES: None. PiperOrigin-RevId: 204162234
* Change some core semantics of skydoc.Gravatar cparsons2018-07-11
| | | | | | | | - Change Skydoc to only document exported symbols in the target file, instead of all exported symbols in the transitive dependencies of the target file. This circumvents a prior error scenario where main.bzl could depend on dep.bzl, and both export a rule named ?my_rule?, which would result in a conflict. - Offer the option to specify whitelisted symbols for which to output documentation, allowing a user to only request documentation for a subset of rules defined in a given file. This allows more granular control of documentation layout. RELNOTES: None. PiperOrigin-RevId: 204161197
* Move caching to BuildOptions instead of BuildConfigurationValue.Key.Gravatar mjhalupka2018-07-11
| | | | PiperOrigin-RevId: 204154609
* Pass options to BuildEventArtifactUploaderFactory.Gravatar tomlu2018-07-11
| | | | | | | The artifact uploaders may need command-level options. RELNOTES: None PiperOrigin-RevId: 204151808
* Refactor handling of API generation in JavaPluginInfoProviderGravatar cushon2018-07-11
| | | | | | | | | | | | Instead of keeping two copies of state for the API-generating and non-API-generating cases, create a 'JavaPluginInfo' abstraction to contain all state for each case, and then keep two copies in the top-level JavaPluginInfoProvider provider. This will make it easier and less error-prone to add additional state to the provider. PiperOrigin-RevId: 204151605
* Add attribute information to skydoc outputGravatar cparsons2018-07-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 204147228
* Simplify dSYM handlingGravatar Googler2018-07-11
| | | | | | | | | | | | | | - Previously we would zip the output of dsymutil and then proceed to unzip it. Due to the size of dSYM files, this could add a few seconds to all builds with dSYMs. - There's no need to have a DsymOutputType or even Info.plist as all we need is the DWARF symbol file; the dSYM is repackaged later on by the bundler. This change is synchronized with the CROSSTOOL and wrapped_clang via the `no_dsym_create_zip` feature, which Bazel sets on the CROSSTOOL to inform wrapped_clang that no zip file should be created for the dSYM. PiperOrigin-RevId: 204134986
* Deprecate py_extension "outs" attribute.Gravatar Googler2018-07-11
| | | | | RELNOTES: PiperOrigin-RevId: 204126150
* Deletes Multimap marshaller. Superceded by MultimapCodec.Gravatar shahan2018-07-11
| | | | PiperOrigin-RevId: 204121958
* Remove the "slow read" warning when using multi-threaded digesting.Gravatar philwo2018-07-11
| | | | | | | | | | Calculating the throughput of a digest operation and using it to assess whether I/O is slow or not only makes sense when we're doing sequential I/O. With parallel hashing, it's expected that individual operations are slow due to how the scheduler works, but it doesn't mean that the overall progress is slow. RELNOTES: None. PiperOrigin-RevId: 204115311
* Skip fingerprinting stuff into a CppCompileAction's key that can only affectGravatar Googler2018-07-11
| | | | | | | | | the result of include validation if dotd file scanning (and in turn input validation) is disabled. Fingerprinting these data structures is costly as they are large NestedSets. RELNOTES: None. PiperOrigin-RevId: 204112075
* remote: unix socket support for remote http cachingGravatar buchgr2018-07-11
| | | | | | | | | | | This adds support for Unix sockets to Bazel for the remote http cache. See corresponding issue #5098 for discussion. RELNOTES: Introduce the --remote_cache_proxy flag, which allows for remote http caching to connect via a unix domain socket. PiperOrigin-RevId: 204111667
* Fix obvious bug. I am not going to write a test as this function doesn't evenGravatar Googler2018-07-11
| | | | | | | seem to be used. RELNOTES: None. PiperOrigin-RevId: 204084726
* Automated rollback of commit 3ea6c18a623d6495a81f12baace40d3bc8a72bbe.Gravatar lberki2018-07-11
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks non-Rabbit builds, see b/111275650. *** Original change description *** Avoid long, duplicated directory structures. In the common case, generated files are going to be beneath the target that generates them. In this case, don't duplicated the package's path. RELNOTES: None. PiperOrigin-RevId: 204084475
* Retry ensureInputsPresent/execute/downloadGravatar George Gensure2018-07-10
| | | | | | | | This observably removes any ill effect of CAS transience. Closes #5229. PiperOrigin-RevId: 204010317
* Remove outdated TODOGravatar juliexxia2018-07-10
| | | | | RELNOTES: None. PiperOrigin-RevId: 203977219
* C++: Exposes new parameters of C++ Skylark API.Gravatar plf2018-07-10
| | | | | | | This will be needed by py_wrap_cc in a follow up CL. RELNOTES:none PiperOrigin-RevId: 203964457
* Remove ToolchainContextException and make exception handling more robust.Gravatar John Cater2018-07-10
| | | | | Change-Id: Iefeab0de85541b963c6cc262339e73b79f630f8b PiperOrigin-RevId: 203952823
* Synchronize on process factory to inhibit ETXTBSYGravatar George Gensure2018-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | Refocus synchronization mechanism to cope with file descriptor set fork- induced races to more tightly constrain concurrent fork/exec pairs. This problem has been observed in bazel proper repeatedly, exhibiting as the iconic ETXTBSY - Text file busy in wide worker pool builds and tests. Evidence that this was discovered by @buchgr is in the comment and change to the embedded ExecutionService implementation, and the description of the race and the need for the synchronization was lifted from that scope to the JavaSubprocessFactory. This factory is a singleton and represents the gateway to all worker process execution, and serves as the correct lock primitive to ensure that file descriptor sets are not duplicated across forks, which gave rise to this issue. To test this, I demonstrated a reproducer presented at https://bugs.java.com/view_bug.do?bug_id=8068370 with 2.4% of invocations in that pathological case exhibiting the issue. With a functionally equivalent change - synchronizing around a processBuilder.start() call - as the only modification to the reproducer, no further failures of any kind were observed, over several hundred runs. Closes #5556. PiperOrigin-RevId: 203947224
* Remove old implementation for object file pathGravatar pcloudy2018-07-10
| | | | | | RELNOTES: --experimental_shortened_obj_file_path is removed. PiperOrigin-RevId: 203944948
* Track additionallyPrunableIncludes separately from declaredIncludeSrcs (don'tGravatar Googler2018-07-10
| | | | | | | | | | | | | | | | | | compose a nested set encompassing both). The current prunableHeaders were used in various places, at least two of which let to a duplicate iteration through the comparatively large declaredIncludeSrcs: CppCompileAction.computeKey() and CppCompileAction.getAllowedDerivedInputs(). Also do some other minor optimizations: - CcCompileActionBuilder.buildAllInputs() now just returns a NestedSet with the same order as its parameter. As inputsForValidation is almost always empty, this makes this NestedSet pass the underlying one through. - CcCompilationContext.directModuleMaps is just a list of the module maps of direct dependencies. As such, there is no use for keeping them in a NestedSet. RELNOTES: None. PiperOrigin-RevId: 203938011
* Bazel server, VFS: revert to using asByteSourceGravatar laszlocsomor2018-07-10
| | | | | | | | | | | | | | | | | | commit 59f17d6e0550bf63a0b6ef182e2d63474e058ede updated files to use try-with-resources when dealing with streams. The change also got rid of asByteSource, replacing it with throw-away ByteSource instances wrapping a try-with-resources-guarded InputStream. Doing so was unnecessary though, because all ByteSource methods (except for open[Buffered]InputStream) close the stream. Thanks to @jbduncan to point that out and explain in detail [1]. [1] see comment thread on https://github.com/bazelbuild/bazel/commit/59f17d6e0550bf63a0b6ef182e2d63474e058ede under `FilesetManifest.java` RELNOTES: none PiperOrigin-RevId: 203934830
* Only compile a single source file once for a given cc_* rule.Gravatar lberki2018-07-10
| | | | | RELNOTES: None. PiperOrigin-RevId: 203934582
* Bazel server, tools: ensure Writers are closedGravatar laszlocsomor2018-07-10
| | | | | | | | | | | | | | | | | | | | Follow-up to commit 09d20311d982606093ed881d779bb05a5ee70ed3. Use try-with-resources to ensure Writer objects are closed eagerly. Eagerly closing Writers avoids hanging on to file handles until the garbage collector finalizes the object, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203934471
* Use generic classes instead of cquery specific class.Gravatar twerth2018-07-10
| | | | | | | Also introduce NamedThreadSafeOutputFormatterCallback for common code. RELNOTES: None PiperOrigin-RevId: 203932877
* Update third_party/protobuf to 3.6.0Gravatar Loo Rong Jie2018-07-10
| | | | | | Fixes #5439. PiperOrigin-RevId: 203917717
* Restructure the NestedSet usage in CcCompilationContext. Goals:Gravatar Googler2018-07-10
| | | | | | | | | | | | | | | | | | - Don't use NestedSets of NestedSets. Not sure whether this is a performance improvement or has serialization benefits, but it does make understanding the structure a lot easier. - Use the same large NestedSet for all header information (whether or not they are modular and what pregrepped headers might exist). This speeds up the include scanner calls getLegalGeneratedScannerFileMap and getModularHeaders because they now iterate over just a single NestedSet and the second evaluation of a NestedSet is much cheaper. In a subsequent change, we can likely fold all three iterations over this NestedSet into one (in getLegalGeneratedScannerFileMap, getModularHeaders and getUsedModules). Measurements show a small reduction in heap usage. RELNOTES: None. PiperOrigin-RevId: 203909308
* Pull up calls to ToolchainContext.resolvedToolchainLabels and finishGravatar John Cater2018-07-09
| | | | | | | ToolchainContext configuration earlier. Change-Id: I034f56a8a181aac19ecb38e51558ccdc6c0c7a6a PiperOrigin-RevId: 203835978
* Fix CcCompilationInfo to appropriately subclass Struct, and improve upon ↵Gravatar cparsons2018-07-09
| | | | | | | error messaging and commenting when there's an unresolvable skylark type. RELNOTES: None. PiperOrigin-RevId: 203826504
* Tell user to blaze clean --expunge.Gravatar dmaclach2018-07-09
| | | | PiperOrigin-RevId: 203813666
* Fix typo in javadoc for FileValue#realRootedPath.Gravatar shreyax2018-07-09
| | | | PiperOrigin-RevId: 203813658
* [Reland] Accept proto paths relative to proto_source_root as direct ↵Gravatar Googler2018-07-09
| | | | | | | | | | | | | | | dependencies. This is a reland of https://github.com/bazelbuild/bazel/commit/5deca4cf88f5568771f2c836a9b8c693b88bd749. This will make protoc see as direct dependencies the .proto files that were included using the proto_source_root flag. Until now, Bazel passed to protoc the direct dependencies of a target as the path relative to the WORKSPACE, which made it fail when a shorter path, relative to the package was used. Progress on #4544. RELNOTES: None. PiperOrigin-RevId: 203808292
* Adds interning to CcToolchainVariablesGravatar shahan2018-07-09
| | | | | | This entails adding equality to all VariableValue subclasses. PiperOrigin-RevId: 203796225
* Simple Markdown rendering for skydocGravatar cparsons2018-07-09
| | | | | | | This uses apache velocity engine templates to create markdown-HTML. There are other alternatives, but there is already precedent for depending on this library from docgen. RELNOTES: None. PiperOrigin-RevId: 203795431
* Allow rules to define an implicit "$toolchains" attribute which can be used toGravatar jcater2018-07-09
| | | | | | contribute Make variables. PiperOrigin-RevId: 203789736
* Bazel server, tools: ensure Readers are closedGravatar laszlocsomor2018-07-09
| | | | | | | | | | | | | | | | | | | | Follow-up to commit 59f17d6e0550bf63a0b6ef182e2d63474e058ede. Use try-with-resources to ensure Reader objects are closed eagerly. Eagerly closing Readers avoids hanging on to file handles until the garbage collector finalizes the object, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203771262
* Add more profiling information to better understand what's happening in ↵Gravatar twerth2018-07-09
| | | | | | | analysis phase. RELNOTES: None PiperOrigin-RevId: 203771085
* Sync jmmv@'s table styles for the docs.bazel.build site.Gravatar jingwen2018-07-09
| | | | | | | | | | Sources: https://github.com/bazelbuild/bazel-blog/commit/846478d6943162f4c4d7d50001069e0ca7b2ec28 https://github.com/bazelbuild/bazel-blog/commit/aacaa25314678c08772372b3d46697f7963bb201 RELNOTES: None. PiperOrigin-RevId: 203763253
* Update protobuf to 3.6.0. Fixes #5439Gravatar Loo Rong Jie2018-07-09
|
* Revert "Update protobuf to 3.6.0. Fixes #5439"Gravatar Jakob Buchgraber2018-07-09
| | | | This reverts commit a2cac548616e6e6f433df27146c2971f352a4041.
* Update protobuf to 3.6.0. Fixes #5439Gravatar Loo Rong Jie2018-07-09
|