aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Tags some more non-serializable classes (for serialization).Gravatar shahan2018-03-13
| | | | PiperOrigin-RevId: 188930446
* Integrate memoization into standard serialization. This involves a number of ↵Gravatar janakr2018-03-13
| | | | | | | | | | | | | | | | large changes: 1. SerializationContext and DeserializationContext become the owners of the Memoizer if requested. They produce new versions of themselves on demand that are memoization-aware. Because of intricacies of Skylark that I do not fully understand, we inject a Mutability object when starting memoization, and so to be conservative, that injection starts up a new memoization frame, nested if we were already memoizing, just like before. It would be nice to decouple this injection from memoization in the future. 2. MemoizingCodec is deleted, but really ObjectCodec becomes MemoizingCodec, so it lives on. BaseCodec is deleted since it now has only one implementation. 3. The simplified model of registering MemoizingCodecs is adopted for ObjectCodecs: all codecs are registered based on their #getEncodedClass and #additionalEncodedSubclasses. This also allows us to register codecs that are defined using tricky parameter types, since we're no longer trying to reflectively examine them. This required a clean-up of such codecs, and the addition of ArrayListCodec to stop NullableListCodec from making lists unmodifiable when they shouldn't be. 4. @AutoCodec is extended to allow users to specify that memoization should start with this codec. To ensure bit-equivalence, SkyKeySerializer disables memoization. PiperOrigin-RevId: 188918251
* Integrate import_deps_checker into aar_import.Gravatar cnsun2018-03-13
| | | | | RELNOTES: Enable dependency checking for aar_import targets. PiperOrigin-RevId: 188912126
* Remove documentation regarding keystore name and password.Gravatar ajmichael2018-03-13
| | | | | RELNOTES: None PiperOrigin-RevId: 188895880
* Add a helper method for checking whether toolchain resolution is enabled for ↵Gravatar John Cater2018-03-13
| | | | | | | | | a toolchain type. Closes #4832. Change-Id: Ia4fce6dd7003dc441f81ea7ca65ce865ca222142 PiperOrigin-RevId: 188882041
* Clean up testing of constraint-based selects to not rely on anything that ↵Gravatar John Cater2018-03-13
| | | | | | | | | uses toolchains. Closes #4833. Change-Id: I9f58dc98cc00d0b2246d479d33a5086114d95073 PiperOrigin-RevId: 188882007
* Remove assumption from test that /a and /b don't exist.Gravatar buchgr2018-03-13
| | | | | | | | | | The updated test cases in the InMemoryFileSystemTest make the assumption that /a and /b are not prefixes of the InMemoryFilesystemTest.workingDir field. This is not safe and thus use a randomly generated directory name instead of a hardcoded one. PiperOrigin-RevId: 188872604
* WORKSPACE file: fix sha256 of j2objc-2.0.3.zipGravatar Laszlo Csomor2018-03-13
| | | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4801 Change-Id: I6a66a4d0cb3651484af48a10f5f9eabbf569a8dc Closes #4826. Change-Id: I6a66a4d0cb3651484af48a10f5f9eabbf569a8dc PiperOrigin-RevId: 188866578
* PiperOrigin-RevId: 188862123Gravatar lpino2018-03-13
|
* Make DeployArchiveBuilder fetch the C++ toolchain identifier throughGravatar lberki2018-03-13
| | | | | | | | | CcToolchainProvider instead of BuildConfiguration. This is a step towards removing BuildConfiguration#getPlatformName(). RELNOTES: None. PiperOrigin-RevId: 188862029
* Allow @Ignore on junit test classesGravatar Stephen Amar2018-03-13
| | | | | | | | | | | | | | | | | | | | | | | | Currently a test class annotated with `@Ignore` will cause the test runner to fail with ``` Exception in thread "main" java.lang.IllegalArgumentException: Top test must be a suite at com.google.testing.junit.runner.junit4.JUnit4TestModelBuilder.get(JUnit4TestModelBuilder.java:53) ``` This change treats classes with no tests (either no @Test annotations or @Ignore at class level) as an empty test suite. The main motivation behind this is allowing an entire test class to be ignored (e.g. to quickly deal with a flaky test) without having to modify the BUILD file. This is desirable in order to reduce the likelihood that a developer forgets to update the BUILD file when removing the `@Ignore` annotation. This pull request overrides the previous pull request https://github.com/bazelbuild/bazel/pull/4073 Closes #4293. PiperOrigin-RevId: 188850828
* tests: add TimestampGranularityUtilsGravatar laszlocsomor2018-03-13
| | | | | | | | | | | | | | Add a new test utility class TimestampGranularityUtils which offers methods to wait for the filesystem timestamp granularity to pass. Such waiting is necessary if a test asserts changes in a file's mtime or ctime. This is a follow-up to comments on https://github.com/bazelbuild/bazel/commit/a31e035fb42aa8db9fd248ef2ebd665a411053b8. PiperOrigin-RevId: 188847729
* Make KeepScanner tool search classpath for nearest definition of each member ↵Gravatar kmb2018-03-12
| | | | | | | | | reference, instead of potentially referring to a subtype. Refactor desugar's class loading machinery and related code into a separate package for easier reuse in this tool. RELNOTES: None. PiperOrigin-RevId: 188825305
* Fix toolchain and execution platform registration to use patterns.Gravatar John Cater2018-03-12
| | | | | | | | This allows more flexibility in registering toolchains and execution platforms, both in the WORKSPACE and from the command-line. Change-Id: I6fe75507d1a74de74085b7c927fdf093c152b894 PiperOrigin-RevId: 188813688
* Add mostly-ide-generated hashCode for RootedPathGravatar michajlo2018-03-12
| | | | | | | Removed null-checks since not expecting null. RootedPath's hashCode is called enough that it's worth optimizing. PiperOrigin-RevId: 188801280
* Fix javac-turbine diagnostic formatting to include source positionGravatar cushon2018-03-12
| | | | PiperOrigin-RevId: 188799934
* Minor fixes to KeepScanner tool:Gravatar kmb2018-03-12
| | | | | | | | - use Guava to read zip entries - Fix keep rules emitted for constructors RELNOTES: None. PiperOrigin-RevId: 188781547
* Tag Attribute, SkylarkDefinedAspect and some other Skylark classes withGravatar mjhalupka2018-03-12
| | | | | | | | | @AutoCodec. Remove Environment from SkylarkDefinedAspect. Add a note to BuiltInFunction that we shouldn't need to serialize it because all instances should be constant. PiperOrigin-RevId: 188763259
* Support custom implementations of emulated core interface methodsGravatar kmb2018-03-12
| | | | | | RELNOTES: None. PiperOrigin-RevId: 188760099
* Added release and release_file parameters to pkg_rpmGravatar mmikitka2018-03-12
| | | | | | | | | | | | 1. Added the "rpm_nvra" output which follows the recommended package naming convention of *Name-Version-Release.Arch.rpm* (NVRA). See http://ftp.rpm.org/max-rpm/ch-rpm-file-format.html 2. Expose "release" and "release_file" parameters to support the NVRA naming convention 3. Remove the mandatory constraint on version parameters (version or version_file): I want to auto-generate my SPEC file outside of the pkg_rpm rule, and I don't want pkg_rpm altering the file. Closes #4732. PiperOrigin-RevId: 188744806
* Prefix startup dots with "Connecting to local Bazel server..." message.Gravatar ruperts2018-03-12
| | | | | RELNOTES: None. PiperOrigin-RevId: 188744724
* Remove comment that is false as of a recent commit.Gravatar nharmata2018-03-12
| | | | | RELNOTES: None PiperOrigin-RevId: 188739970
* Remove support for blaze dump --vfs.Gravatar tomlu2018-03-12
| | | | | | | It is no longer meaningful since the vfs doesn't have an internal path tree to dump. RELNOTES: Remove support for blaze dump --vfs. It is no longer meaningful. PiperOrigin-RevId: 188739379
* Clarify description of the configuration typeGravatar brandjon2018-03-12
| | | | | RELNOTES: None PiperOrigin-RevId: 188735555
* Recommend against writing "boolattr = 1" in style guideGravatar brandjon2018-03-12
| | | | | RELNOTES: None PiperOrigin-RevId: 188730878
* Automated rollback of commit 7ba939dfd5df48903929e9c14ebd0449656403e4.Gravatar shreyax2018-03-12
| | | | | | | | | | | | *** Reason for rollback *** Likely cause for non-determinism in skyframe *** Original change description *** Cache SkylarkLookupImportValues in memory so that we don't recompute them multiple times. PiperOrigin-RevId: 188729929
* update Bazel's build status badge to refer to Buildkite.Gravatar buchgr2018-03-12
| | | | | | SKIP_KOKORO: Documentation change only RELNOTES: None PiperOrigin-RevId: 188726600
* Unify action_configs for static librariesGravatar hlopko2018-03-12
| | | | | | | | | | | We don't need to separate them into 4 different flavours, all crosstools define them identically anyway. RELNOTES: CppRules: Unified action_configs for static libraries From now on only c++-link-static-library is read. PiperOrigin-RevId: 188726352
* Allow templated expansion of data dependency names in the RPM spec file.Gravatar John Cater2018-03-12
| | | | | | | | | | | Fixes #4810, invalidates #4782, and extends #4747. Change-Id: I19426bb30a151358875e9bae0e0c1d92b3818432 Closes #4816. Change-Id: I5d92cec994103e2136c5ed279780f321a42d1bdd PiperOrigin-RevId: 188722982
* Fix docstring variable expansion for @SkylarkModuleGravatar brandjon2018-03-12
| | | | | RELNOTES: PiperOrigin-RevId: 188712452
* Fix table of contents on query site.Gravatar dannark2018-03-12
| | | | | RELNOTES: None. PiperOrigin-RevId: 188711261
* remote: fix flakiness of HttpBlobStoreTest on Windows.Gravatar buchgr2018-03-12
| | | | | | | | Increase the connect timeout to 30 seconds Windows sometimes seems to need more time. RELNOTES: None PiperOrigin-RevId: 188702864
* Add RuleContext#getConfiguredTargetAndDataMap and use it in analysis/Util.Gravatar janakr2018-03-10
| | | | PiperOrigin-RevId: 188629293
* Make RuleContext#getSplitPrerequisiteConfiguredTargetAndTargets public and ↵Gravatar janakr2018-03-10
| | | | | | use it in android/NativeLibs. PiperOrigin-RevId: 188625886
* Fix broken links and formattingGravatar brandjon2018-03-10
| | | | | RELNOTES: None PiperOrigin-RevId: 188625855
* Add RuleContext#getPrerequisiteConfiguredTargetAndTarget and use it in ↵Gravatar janakr2018-03-10
| | | | | | GoTest to avoid calling ConfiguredTarget#getConfiguration. PiperOrigin-RevId: 188623273
* Replace some #getConfiguration calls coming from a TransitiveInfoCollection ↵Gravatar janakr2018-03-10
| | | | | | that was obtained from a ConfiguredTargetAndData object anyway. PiperOrigin-RevId: 188621245
* Get rid of non-class-based lookups for ObjectCodecs. There were basically no ↵Gravatar janakr2018-03-10
| | | | | | | | remaining non-test users (ErrorInfoEncoder was it). Should help to simplify our codec registration. I want to converge MemoizingCodec and ObjectCodec, and the unnecessary complexity around ObjectCodec registration is annoying. PiperOrigin-RevId: 188620988
* Open-source ImmutableMapCodec and make it able to handle arbitrary ↵Gravatar janakr2018-03-10
| | | | | | | | | | keys/values without injecting the codecs. Also allow it to handle ImmutableSortedMap, since we were always silently degrading to ImmutableMap for objects that weren't declared as ImmutableSortedMap, and there's no good way to handle non-natural comparators. This will lead to runtime failures if a class actually needs an ImmutableSortedMap with a different comparator than the natural one. This changes the semantics of ImmutableMap serialization. Previously, we went off the declared type. In the case of a declared ImmutableSortedMap, we ignored the comparator, potentially leading to incorrect serialization (new test added in AutoCodecProcessorTest that would have caught that). Moreover, declared ImmutableMaps were deserialized as ImmutableMaps even if they were actually ImmutableSortedMaps. Now, we preserve the ordering unconditionally, and preserve the type if possible. I think this is a better state to be in. This is needed to kill off MemoizingCodec, since MemoizingCodec has an ImmutableMapMemoizingCodec, which I want to get rid of in favor of this. PiperOrigin-RevId: 188619637
* Replace ConfiguredTargetAndData#getConfiguredTarget()#getConfiguration() ↵Gravatar janakr2018-03-10
| | | | | | with ConfiguredTargetAndData#getConfiguration(). Done using intellij structural replace. PiperOrigin-RevId: 188618282
* Make memoizing serialize and deserialize methods that take a codec ↵Gravatar janakr2018-03-10
| | | | | | package-private. PiperOrigin-RevId: 188610579
* Explicitly don't serialize/deserialize Package objects in ↵Gravatar janakr2018-03-10
| | | | | | ConfiguredTargetValue. The nested set of packages isn't usually set when serializing/deserializing, but it's good to be explicit, especially in tests. PiperOrigin-RevId: 188605043
* Update links to examplesGravatar brandjon2018-03-10
| | | | | | | See changes in https://github.com/bazelbuild/examples/pull/56 RELNOTES: None PiperOrigin-RevId: 188601311
* Add BuildConfiguration to ConfiguredTargetAndTarget and rename it to ↵Gravatar janakr2018-03-10
| | | | | | ConfiguredTargetAndData. We want to get BuildConfiguration out of ConfiguredTarget because it uses >800K when serialized. PiperOrigin-RevId: 188600002
* ActionOwner references only BuildEvent instead of full BuildConfigurationGravatar shahan2018-03-10
| | | | | | This reduces the size of its serialized representation. PiperOrigin-RevId: 188597127
* remote/http: support refresh of oauth2 tokens in the remote cache.Gravatar Jakob Buchgraber2018-03-10
| | | | | | Closes #4622. PiperOrigin-RevId: 188595430
* Allow ObjectCodecRegistry to handle MemoizingCodecs. Initially this is just ↵Gravatar janakr2018-03-09
| | | | | | | | | | | | | | | | Skylark memoization, but we may extend in future to handle more than just Skylark this way. In fact, we probably want most of our ObjectCodecs to be MemoizingCodecs that can efficiently fall back to ObjectCodec if not using memoization (maybe coming in a follow-up). At a high level, this CL merges the functionality of MemoizingCodecMap into ObjectCodecRegistry, adds auto-registration of MemoizingCodec, and uses that to get rid of a lot of codecs that were just delegating. The big one to get rid of there is SkylarkValueCodec: all of its delegation duties are implicitly now in ObjectCodecRegistry and friends. One danger with this CL is that many of the features of Skylark serialization are only being tested in unit tests, which had to be reworked as part of this change. I don't think we've lost any coverage, but I could be wrong. SkylarkValueCodec had a bunch of methods that were effectively test-only, which made it easier to remove. The plan is to provide a Memoizer.Serializer inside the SerializationContext. At the top level, it will be a DUMMY_SERIALIZER that does no memoization, but a MemoizingCodec can do context = context.ensureMemoizing() which will recreate the context with a true memoizing serializer. Then all references to the Serializer in codec code can be cleaned up, and the MemoizingCodec and ObjectCodec signatures will be the same. At that point, we can make all ObjectCodecs compatible with memoization by default (with strategy MEMOIZE_AFTER), and add a "memoize" boolean to @AutoCodec. That should allow us to have full interoperability between all codecs. This CL also makes CodecScanner deterministic in the order of classes that it processes (there was a lurking bug here where constants must be deterministically ordered but that wasn't enforced at all). PiperOrigin-RevId: 188559983
* Remove cycle error reporting from query results since they're not strictly ↵Gravatar juliexxia2018-03-09
| | | | | | relevant and only trigger when the implicit or explicit max depth > 20 which is confusing. PiperOrigin-RevId: 188559702
* Use RuleContext.getConfiguration() instead of ↵Gravatar janakr2018-03-09
| | | | | | | | RuleConfiguredTarget.getConfiguration(), since we have it handy. We'd like to get rid of BuildConfiguration from RuleConfiguredTarget. PiperOrigin-RevId: 188545048
* Support for passing options to LTO Backend actions onlyGravatar Googler2018-03-09
| | | | | | | | This is very useful for debugging and performance tuning. RELNOTES[NEW]: Adds --ltobackendopt and --per_file_ltobackendopt for passing options to ThinLTO LTO backend compile actions only. PiperOrigin-RevId: 188521075