| Commit message (Collapse) | Author | Age |
|
|
|
| |
PiperOrigin-RevId: 184587712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
essentially promote OwnedArtifact to ArtifactSkyKey and rename it to ArtifactSkyKey. The king is dead...
Also add some other execution-phase codecs.
PiperOrigin-RevId: 184552706
|
|
|
|
|
|
| |
SpecialArtifact.
PiperOrigin-RevId: 184539696
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
declaration.
PiperOrigin-RevId: 184304653
|
|
|
|
| |
PiperOrigin-RevId: 184144301
|
|
|
|
| |
PiperOrigin-RevId: 183859414
|
|
|
|
|
|
|
|
|
| |
It is not compatible with multiple execution platforms.
Part of #4442.
Change-Id: I683beaae1624130352a6f02bae3f4dfff263ea00
PiperOrigin-RevId: 183855561
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PiperOrigin-RevId: 183826311
|
|
|
|
| |
PiperOrigin-RevId: 183731563
|
|
|
|
| |
PiperOrigin-RevId: 183677348
|
|
|
|
| |
PiperOrigin-RevId: 183662908
|
|
|
|
|
|
|
|
| |
ImmutableSortedSet wherever possible, and use a known explicit ImmutableSortedSet in the case of two sets being equal. This is mainly a cosmetic cleanup for the sequel changes.
Also rename test-only methods in SkyframeExecutor to indicate that, and do a drive-by clean-up of a test that reported hard crashes confusingly because it wrapped RuntimeExceptions.
PiperOrigin-RevId: 182984572
|
|
|
|
|
|
|
| |
Part of #4442.
Change-Id: I49d6d851787727739f50348df2e2ef48392af479
PiperOrigin-RevId: 182795733
|
|
|
|
|
|
| |
owner and fix up BuildConfigurationValue.Key. ConfiguredTargetKey is going to need some modifications to AutoCodec: probably the long-awaited static "create" method.
PiperOrigin-RevId: 182630181
|
|
|
|
|
|
| |
Also add a new appendFile method on Scratch.
PiperOrigin-RevId: 182558199
|
|
|
|
|
|
| |
This makes it clearer that the path fragments in question are relative *to the root*. Confusingly, when the root is absolute, the root relative fragment is also absolute. This makes it a tiny bit clearer that the path fragment may be absolute.
PiperOrigin-RevId: 182544893
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Local execution has an inherent race condition: if a user modifies a file while an action is executed, then it is impossible for Bazel to tell which version of the file was actually read during action execution. The file may have been modified before or after the tool has read it, or, in the worst case, the tool may have read both the original and the modified version. In addition, the file may be changed back to the original state before Bazel can check the file, so computing the digest before / after may not be sufficient.
This is a concern for both local and remote caches, although the cost of poisoning a shared remote cache is significantly higher, and is what has triggered this work.
Fixes #3360.
We solve this by keeping a reference to the FileContentsProxy, and using that to check for modificaitons before storing the cache entry. We output a warning if this check fails.
This change does not increase memory consumption; Java objects are always allocated in multiples of 8 bytes, we use compressed oops, and the FileArtifactValue currently has 12 bytes worth of fields (excl. object overhead), so adding another pointer is effectively free.
As a possible performance optimization on purely local builds, we could also consider not computing digests at all, and only use the FileContentsProxy for caching.
PiperOrigin-RevId: 182510358
|
|
|
|
|
|
|
| |
* Use an enum instead of booleans and null fields having special meaning.
* Remove the exec root from ArtifactRoot. This is only used to calculate artifact exec paths, which can be done from the root's exec path and the root relative path.
PiperOrigin-RevId: 182411710
|
|
|
|
|
|
|
|
| |
An absolute root accepts any absolute path fragments and simply returns it.
This concept replaces the FileSystem root directory concept.
PiperOrigin-RevId: 182400471
|
|
|
|
|
|
|
|
|
|
|
|
| |
container, ConfiguredTargetAndTarget, that can be used to access Targets, and deprecate ConfiguredTarget#getTarget. ConfiguredAndTargetObjects are intended to be limited in scope, not being persisted to Skyframe.
The eventual plan is to remove the target field from ConfiguredTarget.
This CL is mostly straightforward, except for dealing with AliasConfiguredTargets, which cause some complications.
A significant cleanup is still needed before #getTarget can be removed, but I don't see any impossible blockers. We will may still need to store a Target-like object in ConfiguredTarget (that has the RuleClass, or at least a string representation of it, for instance), but that will let us avoid storing a full Target together with its associated Package.
PiperOrigin-RevId: 182371566
|
|
|
|
|
|
|
|
|
|
|
| |
This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions.
Roots are used by RootedPaths and ArtifactRoots.
This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes.
RELNOTES: None
PiperOrigin-RevId: 182271759
|
|
|
|
|
|
| |
We stopped treating empty files specially in the execution phase after unknown commit. So this code is mostly if not entirely orphaned. The only scenario in which this would lead to a semantic difference that I can think of is if the user is running with --nouse_action_cache and a running Bazel server, and they have an action they want to re-run when an empty input file changes, which isn't something we need to be concerned about.
PiperOrigin-RevId: 182109952
|
|
|
|
|
|
| |
Post to the Skyframe Environment instead.
PiperOrigin-RevId: 182096559
|
|
|
|
|
|
| |
This is slightly more descriptive, and we will potentially want to use the name Root for a broader concept shared between ArtifactRoot and RootedPath.
PiperOrigin-RevId: 182082367
|
|
|
|
| |
PiperOrigin-RevId: 181686136
|
|
|
|
|
|
| |
removing the layer of indirection of getting SkyKey out of ActionLookupKey, which uses more memory for no reason.
PiperOrigin-RevId: 181658615
|
|
|
|
| |
PiperOrigin-RevId: 181624201
|
|
|
|
| |
PiperOrigin-RevId: 181545835
|
|
|
|
|
|
|
|
| |
These tests don't require a full Skyframe instance, so we might as well move
them to a lighter-weight test class. Also, it turns out that we have duplicate
tests for equality and hashing - this is now explicit.
PiperOrigin-RevId: 181285144
|
|
|
|
|
|
|
| |
HostTransition can't be migrated yet because it depends on
BuildConfiguration.
PiperOrigin-RevId: 180842784
|
|
|
|
|
|
|
|
| |
Makes GlobDescriptor directly implement SkyKey and adds custom serialization
logic. This lets us narrow visibility and migrate yet another SkyKey away from
LegacySkyKey.
PiperOrigin-RevId: 180705483
|
|
|
|
| |
PiperOrigin-RevId: 179948322
|
|
|
|
| |
PiperOrigin-RevId: 179936355
|
|
|
|
|
|
|
|
| |
This is in preparation for merging FileArtifactValue and FileStateValue.
Progress on #3360.
PiperOrigin-RevId: 179832948
|
|
|
|
| |
PiperOrigin-RevId: 179588512
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #4322, #4306.
*** Reason for rollback ***
Introduces a deadlock (see https://github.com/bazelbuild/bazel/issues/4322)
*** Original change description ***
Make FileSystem operate on LocalPath instead of Path.
PiperOrigin-RevId: 179549866
|
|
|
|
| |
PiperOrigin-RevId: 179082062
|
|
|
|
|
|
|
|
|
| |
--noexpand_test_suites flag will suppress expansion of test_suite
targets into constituent tests, so that command-line aspects can analyze
test_suite targets.
RELNOTES: Added --(no)expand_test_suites flag.
PiperOrigin-RevId: 178892829
|
|
|
|
|
|
| |
make cmdline and vfs depend on serialization. This allows a class to have a pointer to its codec, which simplifies automatic recursive composite codecs.
PiperOrigin-RevId: 178683500
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 177965330
|
|
|
|
|
| |
RELNOTES: The --host_platform and --platform flags are no longer experimental.
PiperOrigin-RevId: 177863761
|
|
|
|
|
|
|
| |
RELNOTES:
First argument of 'load' must be a label. Path syntax is removed.
(label should start with '//' or ':').
PiperOrigin-RevId: 177802628
|
|
|
|
|
|
|
| |
This will enable an easier transition from checked-in BUILD files to ones generated by copybara.
RELNOTES: None
PiperOrigin-RevId: 177514519
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 177487913
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 177332323
|
|
|
|
|
|
| |
It'd be nice to go further and break out a bunch of this code into more generally useful places (especially for callers that don't care about aspects). But that's a big mess and beyond the scope of what I'm aiming for here.
PiperOrigin-RevId: 177307854
|