aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/collect
Commit message (Collapse)AuthorAge
* Have DigestMap support multiple hash functions.Gravatar tomlu2018-08-15
| | | | | RELNOTES: None PiperOrigin-RevId: 208837641
* Delete switch for nested set serialization. It's fast enough to be on by ↵Gravatar janakr2018-06-19
| | | | | | default. PiperOrigin-RevId: 201218341
* 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
* Allow deserialization futures as NestedSet contents, with unrolling blocking ↵Gravatar cpeyser2018-06-13
| | | | | | | | on that future. This allows NestedSet deserialization not to block on storage reads - in-progress deserializations are simply made a member of the NestedSets they produce. PiperOrigin-RevId: 200440131
* Implement a limit for named_set_of_file eventsGravatar ulfjack2018-05-15
| | | | | | | | | | | This adds a command-line option which can be used to force Bazel to split up very large events, e.g., events with hundreds of thousands of entries. This is rare, but happens occasionally. It would be better to control the maximum event size directly, but that is significantly more difficult to do here. PiperOrigin-RevId: 196690600
* Serialization of NestedSet<NestedSet> with NestedSetCodecWithStore waits onGravatar cpeyser2018-05-03
| | | | | | backend writes for inner NestedSet serialization. PiperOrigin-RevId: 195294676
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 195040539
* Wire up future to wait for in NestedSetCodecWithStore.Gravatar janakr2018-04-30
| | | | PiperOrigin-RevId: 194895469
* Refactor NestedSet to permit alternate NestedSetStore implementations.Gravatar cpeyser2018-04-30
| | | | PiperOrigin-RevId: 194787067
* Serialize singleton NestedSets directly in NestedSetCodecWithStore.Gravatar cpeyser2018-04-25
| | | | PiperOrigin-RevId: 194232982
* Remove use of bare Immutable{List,Map,Set} Builder classes.Gravatar jcater2018-04-20
| | | | | | Always use the more-qualified class name for clarity at the site of use. There are too many classes named Builder. PiperOrigin-RevId: 193649193
* Introduce NestedSetStore, which persists information used for NestedSet ↵Gravatar cpeyser2018-04-19
| | | | | | serialization. PiperOrigin-RevId: 193536486
* Clean up IterablesChain.Gravatar tomlu2018-04-18
| | | | | | | | | | | * Change builder return type to Iterable<T> instead of IterableChain<T>. It is over-specified and unnecessary to state the return type so precisely. * Optimize builder for cases where we add 0 or 1 iterables to the chain. In this case, we can simply return the underlying iterables without adding wrappers. * Extract DedupingIterable, it doesn't have anything to do with IterablesChain and is only used in one place RELNOTES: None PiperOrigin-RevId: 193363048
* Introduce NestedSetCodecWithStore, which serializes NestedSet using a ↵Gravatar cpeyser2018-04-16
| | | | | | process-global bimap of fingerprints to NestedSet contents. PiperOrigin-RevId: 193063717
* Use @AutoCodec for NestedSet serialization.Gravatar janakr2018-04-05
| | | | PiperOrigin-RevId: 191797413
* Disable nested set sharing across multiple nested set deserialization ↵Gravatar janakr2018-04-03
| | | | | | | | sessions. This is incorrect in the presence of memoization: a single element may be serialized as just a pair of integers (type + memoization index). Lots of different nested sets may contain elements that are serialized this way, so they will have the same digests. We could consider doing a parallel hash computation, but for now just disable. This is not a full rollback of https://github.com/bazelbuild/bazel/commit/39cef6d6a4a9e3ae80b11a9ccc0f35325852777c since there was a refactoring in it that it doesn't seem worth it to roll back. PiperOrigin-RevId: 191509089
* Allow NestedSetCodec to share members across multiple deserializations.Gravatar cpeyser2018-03-22
| | | | | | This avoids redundancy in memory when multiple NestedSets share a member PiperOrigin-RevId: 190085907
* Add behavior to NestedSetCodec to prevent it from running during testing.Gravatar cpeyser2018-03-21
| | | | PiperOrigin-RevId: 189906038
* Automated rollback of commit e6af9f9178e731a45e552b1d249ded90124945ba.Gravatar janakr2018-03-19
| | | | | | | | | | | | *** Reason for rollback *** See linked bug. *** Original change description *** Add behavior to NestedSetCodec to prevent it from running during testing. PiperOrigin-RevId: 189663863
* Add behavior to NestedSetCodec to prevent it from running during testing.Gravatar cpeyser2018-03-19
| | | | PiperOrigin-RevId: 189602622
* Splits the iterableMarshaller into runtime codecs.Gravatar shahan2018-03-14
| | | | | | Makes NestedSetCodec into a runtime codec instead of a Marshaller. PiperOrigin-RevId: 189110883
* Introduce an Extrema aggregator.Gravatar nharmata2018-02-28
| | | | | RELNOTES: None PiperOrigin-RevId: 187370833
* expectThrows has been renamed to assertThrowsGravatar cushon2018-02-24
| | | | | | More information: https://github.com/junit-team/junit5/issues/531 PiperOrigin-RevId: 186900384
* Adds ObjectCodecRegistry to {Des|S}erializationContext.Gravatar shahan2018-02-20
| | | | | | | | | | | | * AutoCodec now delegates to the registry. * Adds getSuperclass logic for resolving a codec. * Small cleanups for classes that break the registry. TODO after this change: * Explicit CODEC definitions are no longer needed and existing ones should be cleaned up. * POLYMORPHIC is no longer be needed and should be cleaned up. PiperOrigin-RevId: 186351845
* Move CommandLine, CommandLineItem, and ParamFileInfo from ↵Gravatar tomlu2018-02-15
| | | | | | | | | lib.analysis.actions -> lib.actions. These are fundamental types that want to sit alongside types like Spawn. RELNOTES: None PiperOrigin-RevId: 185887971
* Allow CustomCommandLine's mapFn to expand each object into multiple items.Gravatar tomlu2018-02-01
| | | | | | This is needed to migrate JavaCompileAction away from CustomMultiArgv. PiperOrigin-RevId: 184136486
* Improve safety of NestedSetFingerprintCache by detecting multiple instances ↵Gravatar tomlu2018-01-31
| | | | | | | | | | | | of the same mapFn class. This code tries to add protection against the user creating new mapFn instances per-rule. This would cause the nested set cache to be computed per-rule instead of shared across rule instances, causing memory bloat and slowdowns. Since this can only happen in native code, we can get away with detecting this and crashing blaze. I think this is a better choice than silently allowing it / falling back to slow computations. The user can override this behaviour by inheriting from CommandLineItem.CapturingMapFn, in which case the user is explicitly saying they assume responsibility for the number of instances of the mapFn the application will use. PiperOrigin-RevId: 184061642
* Add memory-efficient map for storing nested set -> digest.Gravatar tomlu2018-01-31
| | | | | | | | | Instead of using ConcurrentHashMap, we use a dead-simple open addressed hash hable with a giant byte array with 16-byte slots. We then read or write fingerprints straight into and out of the array, obviating the need to generate intermediate garbage. Locking mechanism is a read-write lock. This should be faster than full synchronisation for read-heavy loads. RELNOTES: None PiperOrigin-RevId: 184019301
* Use nested set cache in key computation for CustomCommandLine.Gravatar tomlu2018-01-29
| | | | | RELNOTES: None PiperOrigin-RevId: 183727976
* Serializer implementation for NestedSetGravatar shahan2018-01-25
| | | | | | | | | | | | | Adds some logging to test helpers for size of serialized data. Jan 25, 2018 7:16:25 AM com.google.devtools.build.lib.skyframe.serialization.testutils.SerializerTester testSerializeDeserialize INFO: total serialized bytes = 70 Jan 25, 2018 7:16:25 AM com.google.devtools.build.lib.skyframe.serialization.testutils.ObjectCodecTester testSerializeDeserialize INFO: total serialized bytes = 208 Kryo output is significantly smaller. PiperOrigin-RevId: 183300353
* Add CommandLineItem interface.Gravatar tomlu2018-01-25
| | | | | | | | This interface makes it clearer in the type system exactly how items that go into a CustomCommandLine are turned into strings. It is a preparatory change to allow command line fingerprints to be more cheaply calculated, but it is valuable in itself from a code quality standpoint. PiperOrigin-RevId: 183274022
* Make ObjectCodecTester more convenientGravatar brandjon2017-12-18
| | | | | | | Add a safe varargs annotation. Use more precise type signature for ObjectCodecTester#verifyDeserialized and AbstractObjectCodecTest#verifyDeserialization. RELNOTES: None PiperOrigin-RevId: 179460437
* Add ActionKeyContext to Action#getKey.Gravatar tomlu2017-11-29
| | | | | | | This key context can be used by actions to share partial key computations, for instance when computing MD5s for nested sets. RELNOTES: None PiperOrigin-RevId: 177359607
* Support nested set serialization.Gravatar tomlu2017-11-27
| | | | PiperOrigin-RevId: 177032673
* Remove the deprecated set constructor from SkylarkGravatar vladmos2017-11-20
| | | | | | | | | | | | | The `set` constructor used to be deprecated, but it was still possible to use it by providing --incompatible_disallow_set_constructor=false. It's still allowed to have `set` in parts of the code that are not executed, this will be deprecated later. RELNOTES[INC]: The deprecated `set` constructor is removed, along with the migration flag --incompatible_disallow_set_constructor. It is still temporarily allowed to refer to `set` from within unexecuted code. PiperOrigin-RevId: 176375859
* Automated rollback of commit 1b98de65873054b148ced772cfa827a7bfb5ad9a.Gravatar dslomov2017-10-23
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** If the 'set' function was used in a .bzl file but not called, --incompatible_disallow_set_constructor=True would allow the load of that .bzl file without error, but this change removes the 'set' function so loading that bzl file is an error. Example failure: https://ci.bazel.io/blue/organizations/jenkins/Global%2FTensorFlow/detail/TensorFlow/245/pipeline/ *** Original change description *** Remove the deprecated set constructor from Skylark The `set` constructor used to be deprecated, but it was still possible to use it by providing --incompatible_disallow_set_constructor=false. RELNOTES[INC]: The flag --incompatible_disallow_set_constructor is no longer available, the deprecated `set` constructor is not available anymore. PiperOrigin-RevId: 173115983
* Remove the deprecated set constructor from SkylarkGravatar vladmos2017-10-13
| | | | | | | | | | The `set` constructor used to be deprecated, but it was still possible to use it by providing --incompatible_disallow_set_constructor=false. RELNOTES[INC]: The flag --incompatible_disallow_set_constructor is no longer available, the deprecated `set` constructor is not available anymore. PiperOrigin-RevId: 171962361
* Extract ImmutableSharedKeysMap class from TransitiveInfoProviderMap.Gravatar Googler2017-06-20
| | | | PiperOrigin-RevId: 159498323
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* Add a class providing a view of a NestedSetGravatar Klaus Aehlig2017-04-06
| | | | | | | | | | | | | When serializing a large number of related nested sets needs to be serialized in an efficient way, it is necessary to access the internal structure of a nested set to efficiently deduplicate shared content. Add a new class that provides such a view on a nested set. Note: part of this change (in particular, the addition of the NestedSetView class) was accidentally committed as part of 617bb896dc5d2b815449459e991c577237d7a7fc. Change-Id: I03660a228a66bbd6d3df2d3e78e8349be2d55f41 PiperOrigin-RevId: 152362816
* Add new names for depset traversal ordersGravatar Jon Brandvein2017-01-20
| | | | | | | | | | The old names are deprecated but still supported for now. A flag for enforcing the deprecation will come in a later change. RELNOTES[INC]: The traversal orders for depsets have been renamed. The old names are deprecated and will be removed in the future. New names: "stable" -> "default", "compile" -> "postorder", "link" -> "topological", "naive_link" -> "preorder". -- PiperOrigin-RevId: 145004718 MOS_MIGRATED_REVID=145004718
* Refactor NestedSetBuilderGravatar Jon Brandvein2017-01-13
| | | | | | | | Add Order#isCompatible, clean javadoc. Also fix broken @Deprecated-based canary for detecting accidental flattening. -- PiperOrigin-RevId: 144331341 MOS_MIGRATED_REVID=144331341
* Global cleanup change.Gravatar Googler2016-12-07
| | | | | | -- PiperOrigin-RevId: 141307853 MOS_MIGRATED_REVID=141307853
* Description redacted.Gravatar Googler2016-06-16
| | | | | -- MOS_MIGRATED_REVID=125013752
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Migrated tests in devtools/build/lib/collect to JUnit 4.Gravatar Florian Weikert2015-12-01
| | | | | -- MOS_MIGRATED_REVID=109083735
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* The Order enum now supports the conversion of its values to and from strings.Gravatar Florian Weikert2015-06-10
| | | | | | | This functionality used to be part of SkylarkNestedSet. -- MOS_MIGRATED_REVID=95526136
* Some more cleanup.Gravatar Ulf Adams2015-03-10
| | | | | -- MOS_MIGRATED_REVID=87942730
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957