Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Move build cache packaging and execution to build-cache-packaging

With this change the build cache becomes independent of tasks, so that in future it can be used to cache things like artifact transforms and Kotlin build scripts via a unified interface.

    • -0
    • +61
    ./internal/origin/OriginMetadataFactoryTest.groovy
  1. … 70 more files in changeset.
Move tests to the correct location

    • -384
    • +0
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -221
    • +0
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 2 more files in changeset.
Remove unused code

ContentHasherFactory has no real use, so let's decrease complexity.

    • -3
    • +1
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 11 more files in changeset.
Fix tests

    • -1
    • +2
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 1 more file in changeset.
Use MD5 as the default hashing function

    • -1
    • +1
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 38 more files in changeset.
Move all hashing-related stuff to base-services

- Renamed existing Hasher -> PrimitiveHasher

- Renamed BuildCacheHasher -> Hasher (this is the one that prefixes hashed data with the length of the data to avoid collisions)

    • -65
    • +0
    ./internal/DefaultBuildCacheHasherTest.groovy
    • -1
    • +1
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 71 more files in changeset.
Remove dependencies on :core

    • -1
    • +1
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 19 more files in changeset.
Drop Physical from Physical*Snapshot

    • -8
    • +8
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 40 more files in changeset.
Move snapshotting files to own package

    • -2
    • +2
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -5
    • +5
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 133 more files in changeset.
Keep empty fingerprint instance in Identifier

    • -3
    • +2
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 5 more files in changeset.
Merge branch 'release'

    • -3
    • +4
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 16 more files in changeset.
Expose input file snapshots to build operation listeners (#6153)

    • -3
    • +4
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 32 more files in changeset.
Merge file and directory cache

Instead of using two different caches for file and directory snapshots,

there is only one. We now cache the metadata of individual files

separately.

    • -4
    • +3
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -9
    • +4
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 31 more files in changeset.
Remove type hierarchy for PhysicalDirectorySnapshot

We now have only one implementation.

    • -2
    • +1
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 8 more files in changeset.
Rename get{ContentHash -> Hash}

    • -1
    • +1
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 21 more files in changeset.
Use the fingerprint package

    • -1
    • +1
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 87 more files in changeset.
Use getContentHash instead of getTreeHash

    • -1
    • +1
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 8 more files in changeset.
Rename some more snapshots -> fingerprints

    • -8
    • +8
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 22 more files in changeset.
Rename Snapshot -> Fingerprint

Where applicable.

    • -6
    • +6
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -2
    • +2
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 42 more files in changeset.
Move *Fingerprint to org.gradle.internal.fingerprint

    • -3
    • +3
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 36 more files in changeset.
Separate fingerprints and snapshots (#5927)

This de-tangles FileContentSnapshot (and removes it) from NormalizedFileSnapshots.

Also it makes clear that only PhysicalSnapshots can be used to check if a file changed the timestamp.

    • -2
    • +2
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -9
    • +6
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 86 more files in changeset.
Fix counting entries when unpacking

    • -4
    • +6
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -1
    • +6
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 4 more files in changeset.
Calculate Merkle hashes for PhysicalSnapshots

    • -1
    • +1
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 21 more files in changeset.
Retain hierarchical structure in file system mirror (#5844)

The `FileSystemSnapshotter` now returns a root for each snapshotted file, possible containing all the children in hierarchy as the directory would no the file system.

This PR also contains some performance related changes:

- Stop interning path segments: That was only necessary when we stored the same path segments in many RelativePath objects. We don't do this any more, so interning should not be necessary and make things faster.

Actually, up-to-date assemble on largeMonolithicJavaProject (parallel false)

is about 40ms faster with this change (2.5 %).

- Don't use IndexedNormalizedFileSnapshots: It seems like there are no real performance gains by using IndexedNormalizedFileSnapshots.

    • -24
    • +21
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -18
    • +23
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 130 more files in changeset.
Mark files accessed when storing them

Prior to this commit files were only marked accessed when loading them.

This relied on the implicit knowledge that the file's modification

timestamp was used to keep track of access. Now that we use a separate

journal we need to mark it accessed when it's created as well.

    • -5
    • +67
    ./local/internal/DirectoryBuildCacheServiceTest.groovy
  1. … 1 more file in changeset.
Use file access time journal for build cache

Reuse `DefaultFileAccessTimeJournal` in for tracking file access in

`DirectoryBuildCacheServiceFactory` for consistency with other caches

and to reduce the number of file operations.

Resolves gradle/gradle-private#1337.

    • -1
    • +3
    ./local/internal/DirectoryBuildCacheServiceFactoryTest.groovy
  1. … 2 more files in changeset.
Remove FileCollectionSnapshot.getFiles

    • -2
    • +0
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 4 more files in changeset.
Clean up least recently used entries in artifacts file store

The files in the artifacts file store cache are now automatically

cleaned up based on a least recently used strategy. The structure in

the cache is as follows:

- modules-2

- files-2.1

- groupId

- artifactId

- version

- hash1 (*)

- file

- hash2 (*)

- file

The cache now keeps track of files accessed inside the marked hash

directories. The cleanup action then deletes all such files that have

not been accessed in the last 30 days.

    • -1
    • +3
    ./local/internal/DirectoryBuildCacheServiceTest.groovy
  1. … 15 more files in changeset.
Dogfood ImmutableFileCollection in tests (#4972)

Reduce the number of static factory methods from ImmutableFileCollection

Use layout.fileFor() in a smoke test

    • -2
    • +2
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 32 more files in changeset.
Allow build cache to be enabled programatically for non root builds (#4936)

    • -1
    • +18
    ./internal/controller/BuildCacheControllerFactoryTest.groovy
    • -1
    • +1
    ./internal/controller/DefaultBuildCacheControllerTest.groovy
  1. … 9 more files in changeset.