Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Move FileAccessTimeJournal to :pineapple

  1. … 20 more files in changeset.
Replace 'Matchers' with 'CoreMatchers'

So we do not require 'org.hamcrest:hamcrest-library' as additional

dependency anymore. Which was only available for most of the tests

because it leaked onto the test compile classpath.

  1. … 162 more files in changeset.
Use 'implementation' dependencies everywhere

  1. … 286 more files in changeset.
Use 'implementation' dependencies everywhere

  1. … 283 more files in changeset.
Use 'implementation' dependencies everywhere

  1. … 286 more files in changeset.
Use 'implementation' dependencies everywhere

  1. … 284 more files in changeset.
Use 'implementation' dependencies everywhere

  1. … 285 more files in changeset.
Use 'implementation' dependencies everywhere

  1. … 285 more files in changeset.
Make script source hashing faster

Do not calcualte the hash for the same script multiple times.

The hash is now stored in the text resource itself so we don't need

an externall managed cache. The UriTextResource implementation has

been thoroughly optimized for local file URIs. Previously reading

those in was a major bottleneck due to copying every byte into 4(!)

different buffers.

Adding the HashCode to the TextResource made me aware of the fact

that the tooling API depended on these interfaces, although it should

never be reading scripts. It turns out that the script was attached to

the BuildLayout, where it didn't really belong. It is now only created

once the build is running and we are actually trying to load the settings

file. There were a few changes to types marked with @UsedByScanPlugin.

These were all checked against the scan plugin code base to ensure they

are safe. The reported data is now more accurate as it returns a `null`

value for a non-existing settings file instead of reporting a dummy path.

  1. … 24 more files in changeset.
Add convenience method to track access to single file

  1. … 8 more files in changeset.
Remove superfluous space from test name

Remove separate interfaces for reading and writing file access time

Now that reading and writing is safe again regardless of the phase

we don't need the separate interfaces anymore.

  1. … 8 more files in changeset.
Write access time asynchronously, read synchronously

File access times are now written asynchronously while the cache is

being used. When it's about to be closed, they are now read

synchronously from the cleanup action because the cache access worker

has then already been stopped.

    • -53
    • +0
    ./internal/resource/local/ModificationTimeFileAccessJournalTest.groovy
    • -0
    • +53
    ./internal/resource/local/ModificationTimeFileAccessTimeJournalTest.groovy
  1. … 29 more files in changeset.
Track artifact cache file access in PersistentIndexedCache

This commit introduces the `FileAccessJournal` interface and provides

two implementations:

ModificationTimeFileAccessJournal::

Reads and sets `File.lastModified()`.

IndexedCacheBackedFileAccessJournal::

Uses a PersistentIndexedCache to store the access timestamp.

The latter is now used in DefaultCacheLockingManager for the artifact

cache. All other PersistentCaches still use the former.

    • -0
    • +53
    ./internal/resource/local/ModificationTimeFileAccessJournalTest.groovy
    • -0
    • +65
    ./internal/resource/local/SingleDepthFileAccessTrackerTest.groovy
  1. … 28 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.

    • -0
    • +76
    ./internal/resource/local/TouchingFileAccessTrackerTest.groovy
  1. … 29 more files in changeset.
Add support for URI-backed text resources

This can be used to point tasks like Checkstyle

to a remote, shared configuration file without

having to package it into an archive and using

dependency resolution.

The implementation reuses the same caching logic

we have for remote build scripts.

    • -0
    • +160
    ./internal/resource/DownloadedUriTextResourceTest.groovy
  1. … 19 more files in changeset.
Identify host fragment as host in file:////host/path resource names (#4074)

Before, also 'host' was treated as part of the path. With the changes

in e13e45a, we do additional path normalization on resource names

when we resolve a relative path. That is, all additional '/'s are

stripped. This also converted '//host' to '/host'. Which is different:

the first is a host (i.e. a network share), and the second is just the

first segment of a path. This fix identifies a host in a path that

starts with '//' and makes this host part of the 'root' in a

ExternalResourceName rather than the path.

This fixes #4002, which is a 4.4 regression. In practice, these changes

only have an effect on Windows.

    • -0
    • +21
    ./internal/resource/ExternalResourceNameTest.groovy
  1. … 2 more files in changeset.
Make UriTextResource#getFile cheaper

This method was checking whether the file exists,

which doesn't make sense, because it could only

happen if a file URI was passed in the constructor.

If that file doesn't exist, then trying to read

content from the URI won't work either. We were

basically checking the existence twice - once when

calling getFile and another time when hashing it or

when trying to read from the URI instead. This made

the happy case unnecessarily slow without improving

failure behavior.

We now return the file unaltered and instead catch

the FileNotFoundException during hashing to provide

a nicer error message.

  1. … 3 more files in changeset.
Some fixes to handling relative URLs specified in the module metadata file.

    • -18
    • +28
    ./internal/resource/ExternalResourceNameTest.groovy
  1. … 1 more file in changeset.
Another test fix for linux Java 9.

Fixed test on linux Java 9.

    • -2
    • +11
    ./internal/resource/local/LocalFileStandInExternalResourceTest.groovy
Merged the file resource implementation for the public `Resource` API into the file resource implementation for `ExternalResource` used by dependency resolution and publishing. This is a small step towards merging and reusing all the various resource implementations.

    • -0
    • +39
    ./internal/resource/local/LocalFileStandInExternalResourceTest.groovy
  1. … 30 more files in changeset.
Renamed a class.

    • -2
    • +2
    ./internal/resource/BuildOperationFiringExternalResourceDecoratorTest.groovy
  1. … 26 more files in changeset.
Shuffled some methods around in the `ExternalResource` hierarchy.

    • -163
    • +0
    ./internal/resource/AbstractExternalResourceTest.groovy
    • -8
    • +238
    ./internal/resource/local/LocalFileStandInExternalResourceTest.groovy
  1. … 3 more files in changeset.
Moved a class to break a package cycle.

    • -110
    • +0
    ./internal/resource/LocalFileStandInExternalResourceTest.groovy
    • -0
    • +111
    ./internal/resource/local/LocalFileStandInExternalResourceTest.groovy
  1. … 5 more files in changeset.
Detangled the `ExternalResource` implementation that represents a local resource, from the implement that represents a local copy of a remote resource.

    • -1
    • +1
    ./internal/resource/AbstractExternalResourceTest.groovy
    • -0
    • +110
    ./internal/resource/LocalFileStandInExternalResourceTest.groovy
  1. … 8 more files in changeset.
Moved `LazyExternalResource` from 'dependencyManagement' to 'resources' project, and reused to implement `UrlExternalResource`.

    • -0
    • +356
    ./internal/resource/transfer/AccessorBackedExternalResourceTest.groovy
  1. … 9 more files in changeset.
Include the number of bytes written in the resource write build operation result.

    • -5
    • +9
    ./internal/resource/BuildOperationFiringExternalResourceDecoratorTest.groovy
  1. … 7 more files in changeset.
Wrap calls to write to a resource in a build operation of type `ExternalResourceWriteBuildOperationType`. No result is attached for these build operations yet.

    • -0
    • +28
    ./internal/resource/BuildOperationFiringExternalResourceDecoratorTest.groovy
  1. … 1 more file in changeset.
Wrap calls to list the children of a resource during dependency resolution in a build operation of type `ExternalResourceListBuildOperationType`.

    • -0
    • +27
    ./internal/resource/BuildOperationFiringExternalResourceDecoratorTest.groovy
  1. … 2 more files in changeset.