aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Deprecate TransitiveInfoCollection#getConfiguration(), adding two new ↵Gravatar janakr2018-03-26
| | | | | | | | methods, TransitiveInfoCollection#getConfigurationKey() and ConfiguredTarget#getConfigurationChecksum(). These methods currently delegate to #getConfiguration(), but in the future they won't. I hope to get rid of #getConfigurationChecksum(), but I may have to fold the checksum into BuildConfigurationValue.Key or leave it as a separate field in ConfiguredTarget. Transform a representative (random?) selection of #getConfiguration calls, to show that it's pretty much possible everywhere. PiperOrigin-RevId: 190474978
* Make a bunch more stuff serializable, especially anonymous classes and ↵Gravatar janakr2018-03-26
| | | | | | lambdas. Give a bit more information in JavaSerializableCodec when serialization fails on an anonymous class or lambda. PiperOrigin-RevId: 190472245
* Big round of sandbox fixes / performance improvements.Gravatar Philipp Wollermann2018-03-26
| | | | | | | | | | | | | | | | - The number of stat() syscalls in the SymlinkedSandboxedSpawn was way too high. Do less, feel better. - When using --experimental_sandbox_base, ensure that symlinks in the path are resolved. Before this, you had to check whether on your system /dev/shm is a symlink to /run/shm and then use that instead. Now it no longer matters, as symlinks are resolved. - Remove an unnecessary directory creation from each sandboxed invocation. Turns out that the "tmpdir" that we created was no longer used after some changes to Bazel's TMPDIR handling. - Use simpler sandbox paths, by using the unique ID for each Spawn provided by SpawnExecutionPolicy instead of a randomly generated temp folder name. This also saves a round-trip from our VFS to NIO and back. Clean up the sandbox base before each build to ensure that the unique IDs are actually unique. ;) - Use Java 8's Process#isAlive to check whether a process is alive instead of trying to get the exitcode and catching an exception. Closes #4913. PiperOrigin-RevId: 190472170
* Add DONE_CHECKING as a reason for requesting nodes.Gravatar shreyax2018-03-26
| | | | | | | | Split registering the unique new deps of a node between those where we're enqueueing a known dependency from a prior build and one where we're adding a new dependency. Replace prefetchBatch with getBatchAsync and add createIfAbsentBatchAsync. PiperOrigin-RevId: 190471980
* Fix typo in linkGravatar brandjon2018-03-26
| | | | | RELNOTES: None PiperOrigin-RevId: 190470599
* Convert SkylarkRuleImplementationFunctions functions to use @SkylarkCallable ↵Gravatar cparsons2018-03-26
| | | | | | | instead. RELNOTES: None. PiperOrigin-RevId: 190463597
* pkg.bzl: adapt to upcoming incompatible changesGravatar Klaus Aehlig2018-03-26
| | | | | | | | Prepare pkg.bzl to be compliant with upcoming Skylark changes. With this change, one can use pkg_tar even if using --all_incompatible_changes. Change-Id: Iff0ed50bda1f93d9f606b783295b049bdf15d242 PiperOrigin-RevId: 190443156
* Set BUILD_WORKSPACE_DIRECTORY and BUILD_WORKING_DIRECTORY when running ↵Gravatar lberki2018-03-26
| | | | | | | tests, too. RELNOTES: None. PiperOrigin-RevId: 190439262
* Automated rollback of commit f873447a073c8f7374e9f8a74ae42784df3f80e1.Gravatar twerth2018-03-26
| | | | | | | | | | | | *** Reason for rollback *** Breaks proto_library_regtest: http://b/76229470 *** Original change description *** @AutoCodec SelectorList and SkylarkFileType. PiperOrigin-RevId: 190434996
* Remove the unused label //tools/defaults:coverage .Gravatar lberki2018-03-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 190434178
* Make "blaze run --direct_run" wrap the command in a shell.Gravatar lberki2018-03-26
| | | | | | | This mimics "--nodirect_run". Apparently, a lot of people depend on this :( RELNOTES: None. PiperOrigin-RevId: 190433808
* BEP: also report the built artifacts in case of a testGravatar Klaus Aehlig2018-03-26
| | | | | | | | If a test target is built and testing is requested, nevertheless report what was built. Change-Id: Ida25f5f73fd4b5e102f2f4923acc555088495a8a PiperOrigin-RevId: 190431506
* Make the script written blaze "blaze run --direct_run --script_path" not ↵Gravatar lberki2018-03-26
| | | | | | | | | overwrite the environment of their caller. Admittedly, doing that was a bad idea in the first place. RELNOTES: None. PiperOrigin-RevId: 190430189
* @AutoCodec some more classes needed for large Java builds.Gravatar janakr2018-03-25
| | | | PiperOrigin-RevId: 190392567
* @AutoCodec ConfiguredValueCreationException. Not a high priority, but while ↵Gravatar janakr2018-03-24
| | | | | | we're getting spurious analysis errors, helps to reduce noise. PiperOrigin-RevId: 190355369
* @AutoCodec SkylarkCustomCommandLine. Includes hack to work around b/76233103.Gravatar janakr2018-03-24
| | | | PiperOrigin-RevId: 190349968
* @AutoCodec ProtoCompileActionBuilder$LazyCommandLineExpansion and ↵Gravatar janakr2018-03-24
| | | | | | $LazyLangPluginFlag. PiperOrigin-RevId: 190349246
* Memoize AspectValue serialization (oops).Gravatar janakr2018-03-24
| | | | PiperOrigin-RevId: 190348986
* @AutoCodec SelectorValue. Rather than making mapMarshaller handle wildcards ↵Gravatar janakr2018-03-23
| | | | | | better, get rid of it, and immutableSetMarshaller for good measure. PiperOrigin-RevId: 190294922
* @AutoCodec map functions in ProtoCompileActionBuilder.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190293560
* Allow AutoValue builder method to have the same name as getter method when ↵Gravatar janakr2018-03-23
| | | | | | using Strategy.AUTO_VALUE_BUILDER, and filter out #toBuilder()-type methods when collecting getters of class. PiperOrigin-RevId: 190292033
* Fold in warning and error output into client logging.Gravatar ccalvarin2018-03-23
| | | | | | | To replace blaze_util::die and blaze_util::pdie as well, FATAL statements need to accept blaze exit codes. RELNOTES: None. PiperOrigin-RevId: 190285798
* @AutoCodec AspectValue.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190285465
* @AutoCodec SelectorList and SkylarkFileType.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190285424
* @AutoCodec SkylarkComputedDefaultTemplate and dependencies.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190284631
* Create a new output formatter for cquery which output transition information ↵Gravatar juliexxia2018-03-23
| | | | | | in either a FULL or LITE version. Trigger new output with the new --transitions cquery flag in the new CqueryOptions class. PiperOrigin-RevId: 190278664
* @AutoCodec JavaRunfilesProvider.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190277450
* Update javadocs in DependencyResolver.Gravatar mjhalupka2018-03-23
| | | | PiperOrigin-RevId: 190258675
* Fix very minor issue in the documentation of the grammatical spec of ↵Gravatar nharmata2018-03-23
| | | | | | | | | 'rbuildfiles': this query function takes a comma-separated list of strings, which it interprets as paths. Also fix an issue with the documented semantics of 'rbuildfiles': it only returns BUILD file targets, not bzl file targets. RELNOTES: None PiperOrigin-RevId: 190257359
* fix typo in blaze user manual.Gravatar juliexxia2018-03-23
| | | | PiperOrigin-RevId: 190256860
* Re-enable aliasing of CodedInputStream during deserialization, removed as ↵Gravatar janakr2018-03-23
| | | | | | | | part of primary codepath somewhere around https://github.com/bazelbuild/bazel/commit/bde43ec8a96a62b8fbf67ad60d5154cf121647d9 (and killed entirely in unknown commit. Force copying of a ByteString read from CodedInputStream in NestedSetCodec and persisted, since otherwise we might hang onto the entire buffer indefinitely. PiperOrigin-RevId: 190256337
* Adds hook to AspectFunction to allow for inlining SkylarkImportLookupFunction.Gravatar cpeyser2018-03-23
| | | | | | If inlining is off, fixes a bug where null return values resulted in an error. PiperOrigin-RevId: 190255818
* Expose mergeManifests method in SkylarkGravatar asteinb2018-03-23
| | | | | RELNOTES: none PiperOrigin-RevId: 190253911
* Don't bound the method and field name caches in FuncallExpression.Gravatar nharmata2018-03-23
| | | | | | | | | | | The number of *unique* Class instances that will be used as keys in these caches over the lifetime of a Bazel server is small-ish, and bounded by the size of the set of unique Classes used as the Java runtime representation of Skylark objects. The bookkeeping done by LocalCache when the cache's size is bounded is therefore pure CPU overhead. While we're here, just use the default capacity (16); a smaller initial capacity seems silly considering these caches are live for the duration of the Bazel server. RELNOTES: None PiperOrigin-RevId: 190238099
* Remove synchronization in ↵Gravatar nharmata2018-03-23
| | | | | | | | | | | BazelPackageBuilderHelperForTesting#sanityCheckBazelPackageLoader. I should have written this comment more precisely. I am sorry I didn't. I vaguely recall some issues where the PackageFactory usage would do some scan of all the skylark classes and do some mutation to global state (this wouldn't normally be a problem since for blaze/bazel, there's one PackageFactory instance created per blaze/bazel server, and it's created at the beginning of the server). Nevertheless, I do not see any problems now. RELNOTES: None PiperOrigin-RevId: 190229913
* RELNOTES: Move (c/cxx)opts from legacy_compile_flags to user_compile_flagsGravatar Googler2018-03-23
| | | | PiperOrigin-RevId: 190224987
* Fix test flakiness due to the filesystem mutations done during the 'fetch' ↵Gravatar nharmata2018-03-23
| | | | | | | | | work done by BazelPackageBuilderHelperForTesting#sanityCheckBazelPackageLoader. We fix this flakiness by _not_ having RepositoryDelegatorFunction unconditionally 'fetch' local repos. We then have to make a change to BazelPackageLoader test to reinstate these mutations, since it was only working before due to the unconditional filesystem mutations done here :p RELNOTES: None PiperOrigin-RevId: 190222830
* Add dependency on googletest, so we can use gmock along with gtest.Gravatar ccalvarin2018-03-23
| | | | | | | third_party/gtest can go away after this. RELNOTES: None. PiperOrigin-RevId: 190221581
* Refactor and cleanup the sandboxing code.Gravatar Philipp Wollermann2018-03-23
| | | | | | | | | | | | | - Remove Optional<> where it's not needed. It's nice for return values, but IMHO it was overused in this code (e.g. Optional<List<X>> is an anti-pattern, as the list itself can already signal that it is empty). - Use Bazel's own Path class when dealing with paths, not String or java.io.File. - Move LinuxSandboxUtil into the "sandbox" package. - Remove dead code and unused fields. - Migrate deprecated VFS method calls to their replacements. - Fix a bug in ExecutionStatistics where a FileInputStream was not closed. Closes #4868. PiperOrigin-RevId: 190217476
* Bugfixes for int()Gravatar brandjon2018-03-23
| | | | | | | | | | - fix negatives + prefixes - fix boundary cases (min int value) The only remaining relevant differences from Python are that we disallow int() with zero args, we don't allow whitespace in strings, and we take Python 3's view on prohibiting leading 0s when base is 0. RELNOTES: None PiperOrigin-RevId: 190216646
* Shorten object file pathGravatar pcloudy2018-03-23
| | | | | | | | | | | | | | | | | | | | | | | Closes #4781. Fix https://github.com/bazelbuild/bazel/issues/4149 RELNOTES: Users can now pass --experimental_shortened_obj_file_path=true to have a shorter object file path, the object file paths (and all other related paths) will be constructed as following: If there's no two or more source files with the same base name: <bazel-bin>/<target_package_path>/_objs/<target_name>/<source_base_name>.<extension> otherwise: <bazel-bin>/<target_package_path>/_objs/<target_name>/N/<source_base_name>.<extension> N = the file?s order among the source files with the same basename, starts from 0. Examples: 1. Output names for ["lib1/foo.cc", "lib2/bar.cc"] are ["foo", "bar"] 2. Output names for ["foo.cc", "bar.cc", "foo.cpp", "lib/foo.cc"] are ["0/foo", "bar", "1/foo", "2/foo"] The default value of --experimental_shortened_obj_file_path option is false, but we plan to flip it to true and eventually remove this option. You shouldn't depend on the format of generated object file path, but if you do and this change breaks you, please use --experimental_shortened_obj_file_path=false to work around it. PiperOrigin-RevId: 190214375
* Remove a unused parameter in PackageFactory#evaluateBuildFile().Gravatar lberki2018-03-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 190207183
* Implement TargetProviderForQueryEnvironment.Gravatar dbabkin2018-03-23
| | | | | | | DirectTargetProvider works with WalkableGraph directly. If it fails to find target, then last try to use delegate TargetProvider which supposed to be PackageManager from SkyframeExecutor. RELNOTES:none PiperOrigin-RevId: 190204106
* Add test that blaze feature_flags are passed correctly when the alias is invokedGravatar Googler2018-03-23
| | | | PiperOrigin-RevId: 190200144
* Victory lap: Remove all code that used to support the three-argument form of ↵Gravatar lberki2018-03-23
| | | | | | | vardef(). RELNOTES: None. PiperOrigin-RevId: 190196933
* Remove the unused Matrix class.Gravatar lberki2018-03-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 190196203
* Remove unnecessary product name and constructors from sandboxed spawn runners.Gravatar jmmv2018-03-23
| | | | | | | | | | The product name was previously propagated to all sandboxed spawn runners unconditionally, even when the majority did not need it. Also, these same spawn runners had obsolete constructors that were not used at all or were only used in tests. Remove both for simplicity. RELNOTES: None. PiperOrigin-RevId: 190195305
* Remove RuleClass.Builder#depsCfg().Gravatar lberki2018-03-23
| | | | | | | The only user of it was Android resource trimming, which just got deleted. RELNOTES: None. PiperOrigin-RevId: 190193627
* Write manifests at the beginning of the jar, not at the endGravatar cushon2018-03-22
| | | | | | | This is the convention, and tools that only read manifests may optimize assuming that the manifest is at the beginning. PiperOrigin-RevId: 190167351
* Detect main dex list entries that will be missingGravatar kmb2018-03-22
| | | | | | RELNOTES: None. PiperOrigin-RevId: 190154101