DefaultCachedClasspathTransformerTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Force AbstractTestDirectoryProvider to use Class (#12431)

Closes https://github.com/gradle/gradle-private/issues/2988

This PR adds `className` to `AbstractTestDirectoryProvider` so there'll be no more `unknown-test-class`.

    • -1
    • +1
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 407 more files in changeset.
Fix tests

    • -1
    • +1
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 372 more files in changeset.
Rename WellKnownFileLocatoins to AdditiveCacheLocations

Clarify this to be a VFS-related concept and move classes to the VFS package in :core.

    • -5
    • +6
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 23 more files in changeset.
Rename WellKnownFileLocatoins to AdditiveCacheLocations

Clarify this to be a VFS-related concept and move classes to the VFS package in :core.

    • -5
    • +6
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 23 more files in changeset.
Fix test

    • -3
    • +7
    ./DefaultCachedClasspathTransformerTest.groovy
Move cache creation for DefaultCachedClasspathTransformer into factory

This is to avoid creating services for it when not needed.

    • -1
    • +1
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 9 more files in changeset.
Move cache creation for DefaultCachedClasspathTransformer into factory

This is to avoid creating services for it when not needed.

    • -1
    • +1
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 9 more files in changeset.
Use WellKnownFileLocations in DefaultCachedClasspathTransformer

    • -4
    • +6
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 3 more files in changeset.
Separate the actual cache from DefaultCachedClasspathTransformer

This is needed so that the cache can be observed among the list of CachedJarFileStore's.

    • -1
    • +3
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 4 more files in changeset.
Move FileAccessTimeJournal to :pineapple

    • -1
    • +1
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 20 more files in changeset.
Rename GradleVersionProvider to UsedGradleVersions

    • -3
    • +3
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 11 more files in changeset.
Clean up old versions of "jars" cache

Old versions of the jars cache (jars-1, jars-2) are now deleted as part

of the cleanup when closing the cache.

    • -11
    • +12
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 3 more files in changeset.
Improve test readability

    • -2
    • +3
    ./DefaultCachedClasspathTransformerTest.groovy
Use persistent file access time journal for "jars-3"

The file access time journal backed by a persistent indexed cache is now

also used for the "jars-3" cache to improve performance and increase

consistency with the other shared caches.

    • -14
    • +6
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 3 more files in changeset.
Clean up least recently used entries in external resources file store

The files in the external resources 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

- resources-2.1

- 0

- hash 1 (*)

- hash 2 (*)

- ...

- ...

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
    • +1
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 29 more files in changeset.
Clean up least recently used entries in jars cache

The files in the jars cache are now automatically cleaned up based on a

least recently used strategy. The structure in the cache is as follows:

- hash 1 (*)

- some.jar

- hash 2 (*)

- another.jar

The cache now keeps track of files accessed inside immediate children

of the cache directory. The cleanup action then deletes all such files/

directories that have not been accessed in the last 7 days.

Issue: #1085

    • -7
    • +37
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 2 more files in changeset.
Changed file snapshotting to assume that files and directories contained in the downloaded artifact and artifact transform output caches do not change during a build, and so to make snapshotting faster.

File system state cached in-memory during a build for these files and directories is not discarded when a task action runs. This avoids scanning the file system potentially many times during a build over files that have almost certainly not changed. All other file system state is still discarded. This strategy is intentionally very simple and can be improved later.

This change also means that jars from the artifact transform output cache are not copied into the jar cache when included in a classpath from which Gradle needs to create a `ClassLoader`. This was already the case for jars from the downloaded artifacts cache.

    • -1
    • +1
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 13 more files in changeset.
Removed the 'description' parameter from the methods of `CacheAccess`. This description is not actually used anywhere and these methods are called many, many times, meaning a lot of unnecessary strings were being created.

    • -1
    • +2
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 40 more files in changeset.
Make explicit when opening a cross-version cache which file should be used for locking to synchronize between processes. Some older versions use different targets for different caches.

    • -1
    • +1
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 18 more files in changeset.
Changed `DefaultCachedClasspathTransformer` so that it asks the artifact cache where it will store jars, rather than attempting to figure this out itself or assuming that there is exactly one artifact cache. Introduced `CachedJarFileStore` abstraction to allow this to happen without coupling the classpath transformer and the artifact cache together.

    • -13
    • +13
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 6 more files in changeset.
Cleanup CachedClasspathTransformer so that it's easier to use in all instances

+review REVIEW-6182

    • -0
    • +90
    ./DefaultCachedClasspathTransformerTest.groovy
  1. … 4 more files in changeset.