aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe
Commit message (Collapse)AuthorAge
* Replace path implementation.Gravatar tomlu2018-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Path and PathFragment have been replaced with String-based implementations. They are pretty similar, but each method is dissimilar enough that I did not feel sharing code was appropriate. A summary of changes: PATH ==== * Subsumes LocalPath (deleted, its tests repurposed) * Use a simple string to back Path * Path instances are no longer interned; Reference equality will no longer work * Always normalized (same as before) * Some operations will now be slower, like instance compares (which were previously just a reference check) * Multiple identical paths will now consume more memory since they are not interned PATH FRAGMENT ============= * Use a simple string to back PathFragment * No more segment arrays with interned strings * Always normalized * Remove isNormalized * Replace some isNormalizied uses with containsUpLevelReferences() to check if path fragments try to escape their scope * To check if user input is normalized, supply static methods on PathFragment to validate the string before constructing a PathFragment * Because PathFragments are always normalized, we have to replace checks for literal "." from PathFragment#getPathString to PathFragment#getSafePathString. The latter returns "." for the empty string. * The previous implementation supported efficient segment semantics (segment count, iterating over segments). This is now expensive since we do longer have a segment array. ARTIFACT ======== * Remove Path instance. It is instead dynamically constructed on request. This is necessary to avoid this CL becoming a memory regression. RELNOTES: None PiperOrigin-RevId: 185062932
* Remove references to getTarget(). Requires threading through anGravatar mjhalupka2018-02-08
| | | | | | | ExtendedEventHandler so we can get the target via the package manager during rule dumps. PiperOrigin-RevId: 185042522
* Add support for javabeans-style getters ("getFoo()", "isFoo()") to AutoCodec'sGravatar cpeyser2018-02-08
| | | | | | AutoValue support. This is required to serialize ActionOwner. PiperOrigin-RevId: 185037291
* Add an AutoCodec marshaller for UUID. This is required to serializeGravatar cpeyser2018-02-08
| | | | | | CppCompileAction. PiperOrigin-RevId: 185020942
* Remove usesFuse output service method.Gravatar felly2018-02-08
| | | | PiperOrigin-RevId: 184998166
* Extract registry functionality from ObjectCodecsGravatar michajlo2018-02-07
| | | | | | | | | | This partially solves the age old problem of how to find a codec for a value we don't know the type of at compile time, and allows us to represent such values on the wire more compactly. @AutoCodec's injecting codec should be able to make use of this right away - we'll need to make an API change to the ObjectCodec interface to allow the existing system to make use. PiperOrigin-RevId: 184918173
* @AutoCodec adds Singleton strategy.Gravatar shahan2018-02-07
| | | | PiperOrigin-RevId: 184889583
* Refactor to get rid of some getConfiguredTarget() calls in tests and replaceGravatar mjhalupka2018-02-07
| | | | | | | them with getConfiguredTargetAndTarget() so we can get rid of ConfiguredTarget.getTarget() callers. This should be a test only change. PiperOrigin-RevId: 184877255
* Add NestedSetCodec to AutoCodec's deploy jar.Gravatar cpeyser2018-02-06
| | | | PiperOrigin-RevId: 184784669
* @AutoCodec support for superclasses having generic parameters.Gravatar shahan2018-02-06
| | | | PiperOrigin-RevId: 184720361
* Add Supplier support to AutoCodec.Gravatar cpeyser2018-02-06
| | | | PiperOrigin-RevId: 184710375
* Update ToolchainResolutionFunction to consider multiple availableGravatar John Cater2018-02-06
| | | | | | | | | execution platforms. Part of #4442. Change-Id: I6678d57f4aaadcb19032bf58820606242ba66a25 PiperOrigin-RevId: 184707708
* Throw NoCodecException on ByteString getCodec specializationGravatar michajlo2018-02-06
| | | | | | Looks like this got missed. PiperOrigin-RevId: 184701334
* Makes @AutoCodec only use Instantiator parameter type information and ignoreGravatar shahan2018-02-06
| | | | | | field type information. PiperOrigin-RevId: 184695891
* Add a marshaller in AutoCodec for Iterable. This marshaller performs a ↵Gravatar cpeyser2018-02-06
| | | | | | runtime check on the type of the iterable, performing custom serialization for a NestedSet. PiperOrigin-RevId: 184686288
* Rename the host platform information in the configuration.Gravatar John Cater2018-02-06
| | | | | | | Part of #4442. Change-Id: I21baffe59431ccd3d76754596ec2a605dbbe4354 PiperOrigin-RevId: 184678470
* Add NestedSet support in AutoCodec for type parameters which have an ↵Gravatar cpeyser2018-02-05
| | | | | | InjectingObjectCodec. PiperOrigin-RevId: 184566571
* Fix Fileset incrementality bug when Fileset consumes a generated file. The ↵Gravatar felly2018-02-05
| | | | | | | | | | | | | | | | native skyframe implementation was actually quite incorrect in this case: It was adding a skyframe dependency on a FileValue for the output file. Without a transitive dependency on the source files and actions that determine the output file's state, this could never work (and explains why the incremental build would fail). Instead, we now depend on the Artifact corresponding to the output file instead. This change updates the business logic RecursiveFilesystemTraversalFunction. This approach keeps the business logic of Fileset filesystem traversal centralized in RFTF. To avoid making weird recursive Skyframe nodes in the output tree, we inline Skyframe dependencies and do direct filesystem operations over the output tree. There are now three states we can be in when looking up a file: 1. Source file: As before, make a skyframe dep on the corresponding file 2. Top-level file of an output tree: Make a dep on the corresponding Artifact 3. Recursive file under an output directory: Do direct filesystem operations. It doesn't make sense to make Skyframe nodes corresponding to these files. In the future, I think we should consider failing fast on this case. RELNOTES: None PiperOrigin-RevId: 184556044
* Refactor ArtifactSkyKey to get rid of an unnecessary wrapper class: actually ↵Gravatar janakr2018-02-05
| | | | | | | | essentially promote OwnedArtifact to ArtifactSkyKey and rename it to ArtifactSkyKey. The king is dead... Also add some other execution-phase codecs. PiperOrigin-RevId: 184552706
* Add type assertion that TreeFileArtifact's parentTreeArtifact member is aGravatar cpeyser2018-02-05
| | | | | | SpecialArtifact. PiperOrigin-RevId: 184539696
* Pass ctime to the TimestampGranularityMonitorGravatar ulfjack2018-02-05
| | | | | | | | We're now using ctime to detect file changes, so the timestamp granularity monitor should as well. Unfortunately, we currently get nanosecond ctime from Linux, but then only return millis from FileStatus, so this doesn't change the accuracy of the monitor at all. PiperOrigin-RevId: 184536539
* Start process of tagging AspectKey. Still a lot of subclasses of AspectClass ↵Gravatar janakr2018-02-02
| | | | | | | | to do. Also change AspectDescriptor #isEmpty() semantics because they seemed like a bug to me. PiperOrigin-RevId: 184319840
* AutoCodec can support NestedSet<T>, where T is a declared declared type thatGravatar cpeyser2018-02-02
| | | | | | | | has a CODEC member. AutoCodec cannot yet support other type parameters for NestedSet, like NestedSet<List<Foo>>. This will have to wait for AutoCodec Runtime. PiperOrigin-RevId: 184294808
* Fix error handling in skyframe target pattern parsingGravatar ulfjack2018-02-02
| | | | | | | | | Bazel completely swallowed errors in some cases, e.g., if the pattern is invalid like bazel build foo//bar:baz. Note that it previously silently ignored empty targets if --experimental_skyframe_target_pattern_evaluator was passed, and now fails (which is consistent with legacy behavior). This is an intentional change, but may break users who are using the experimental flag and are passing empty strings to Bazel. PiperOrigin-RevId: 184282856
* @AutoCodec @AutoValue supportGravatar shahan2018-02-01
| | | | PiperOrigin-RevId: 184211212
* Add codecs for some stray SkyKeys.Gravatar janakr2018-02-01
| | | | PiperOrigin-RevId: 184177838
* Change ConfiguredAspectFactory.create signature to take in aGravatar mjhalupka2018-01-31
| | | | | | | ConfiguredTargetAndTarget instead of a ConfiguredTarget. This is to assist in deprecating ConfiguredTarget.getTarget(). PiperOrigin-RevId: 184043491
* Remove references to ConfiguredTarget.getTarget() in CompletionFunction.Gravatar mjhalupka2018-01-31
| | | | PiperOrigin-RevId: 184040834
* Remove references of ConfiguredTarget.getTarget() from ToolchainUtil.Gravatar mjhalupka2018-01-31
| | | | PiperOrigin-RevId: 184032456
* Automated rollback of commit db65f80cc83d562c0f63c34ce9d9a58fad0e3b0c.Gravatar pcloudy2018-01-31
| | | | | | | | | | | | | | | *** Reason for rollback *** This CL is breaking src/test/shell/bazel/srcs_test https://ci.bazel.build/blue/organizations/jenkins/bazel-tests/detail/bazel-tests/1884/tests Fix https://github.com/bazelbuild/bazel/issues/4548 *** Original change description *** Verbatim, initial checkin of Kryo files for @AutoCodec Runtime. PiperOrigin-RevId: 183977098
* Verbatim, initial checkin of Kryo files for @AutoCodec Runtime.Gravatar shahan2018-01-30
| | | | PiperOrigin-RevId: 183904648
* Don't use null EvaluationProgressReceiver in MemoizingEvaluator (it was only ↵Gravatar janakr2018-01-30
| | | | | | null in AbstractPackageLoader and tests). PiperOrigin-RevId: 183896826
* Adds CodecScanner to help automate building a codec registry.Gravatar shahan2018-01-30
| | | | | | Scan takes 1-2s. PiperOrigin-RevId: 183881368
* Handle the case where platformConfiguration isn't present.Gravatar John Cater2018-01-30
| | | | | | | Part of #4442. Change-Id: I44f52d4200f50af0281735fbba326dce5960e950 PiperOrigin-RevId: 183874104
* Rename Transition to ConfigurationTransition.Gravatar gregce2018-01-30
| | | | PiperOrigin-RevId: 183859414
* Obsolete and begin removing the toolchain_resolution_override flag.Gravatar John Cater2018-01-30
| | | | | | | | | It is not compatible with multiple execution platforms. Part of #4442. Change-Id: I683beaae1624130352a6f02bae3f4dfff263ea00 PiperOrigin-RevId: 183855561
* Add tests for execution platforms to ExternalPackageUtilTest.Gravatar John Cater2018-01-30
| | | | | | | Part of #4442. Change-Id: Ia9c4403817d9c1e6497212712f96dbf6618138e9 PiperOrigin-RevId: 183855255
* Fix RegularFileArtifactValue.equalsGravatar ulfjack2018-01-30
| | | | | | | | If two SkyValue objects are equal, then Skyframe caches and returns the old one, instead of the new one. That's a problem for the detection of file changes, which uses the FileContentsProxy, which wasn't part of the equals check before this change. Progress on #3360. PiperOrigin-RevId: 183834897
* Remove DynamicTransitionMapper, ConfigurationTransitionProxy.Gravatar gregce2018-01-30
| | | | PiperOrigin-RevId: 183826311
* Remove unused "pattern" feature in RecursiveFilesystemTraversalFunction.Gravatar felly2018-01-29
| | | | PiperOrigin-RevId: 183731563
* Add alternative interface for LIPO data transitions, opt in native rules.Gravatar gregce2018-01-29
| | | | | | | | | | | This removes the need for ConfigurationTransitionProxy.DATA by providing a way for the C++ rule defs to directly inject the transition for all rules to use. Skylark attributes work differently, so they'll be addressed in another change. PiperOrigin-RevId: 183721293
* Allows @AutoCodec to use factory methods.Gravatar shahan2018-01-29
| | | | | | Generalizes @AutoCodec.Constructor to @AutoCodec.Instantiator. PiperOrigin-RevId: 183702768
* Additional Serializers and Serializer bugfixes needed to serialize ↵Gravatar shahan2018-01-29
| | | | | | BuildConfiguration. PiperOrigin-RevId: 183667795
* Add codec for ConfiguredTargetKey and remove stray LegacySkyKey constructors ↵Gravatar janakr2018-01-27
| | | | | | that took ConfiguredTargetKey. PiperOrigin-RevId: 183519981
* CanonicalReferenceResolver for KryoGravatar shahan2018-01-26
| | | | | | | | Uses type and object equality to determine references. This results in a canonical serialized representation. ObjectCodecTester and SerializerTester now log some timing information. PiperOrigin-RevId: 183403658
* Remove aspect configuration from AspectKey. Instead, store an appropriate ↵Gravatar cpeyser2018-01-26
| | | | | | SkyKey and perform the lookup in AspectFunction, in parallel with the lookup for the base configured target introduced in unknown commit. PiperOrigin-RevId: 183399436
* BEP: report analysis failure eventsGravatar Klaus Aehlig2018-01-26
| | | | | | | | | | | | | | ...as completion of the respective top-level targets. In this way, a failure is associated to its root cause, even if the cause is at analysis phase; in particular, visibility errors are correctly associated. For the time beeing, we associate visibility root causes only with labels; it is planned to change that to the more accurate configured labels in a follow-up change. Change-Id: I04121a7cd2099fc65171eae0719fd77b98aef09b PiperOrigin-RevId: 183359798
* Serializers for HashCode, Map.Entry and OptionalGravatar shahan2018-01-25
| | | | | | This should bring Serializers to parity with AutoCodec Marshallers. PiperOrigin-RevId: 183330231
* 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
* Serializer implementations for Guava CollectionsGravatar shahan2018-01-25
| | | | PiperOrigin-RevId: 183248133