DefaultScriptCompilerFactoryTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix previous commit.

    • -3
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 7 more files in changeset.
Record the ClassLoader associated with each class that is serialized to the instant execution cache, and use this to make class lookup on deserialize faster and to deal correctly with multiple classes with the same name.

Move some ClassLoader lifecycling from Groovy DSL script compilation to `ClassLoaderScope`, so that the scope takes care of creating and caching the script ClassLoader.

    • -3
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 30 more files in changeset.
Record the ClassLoader associated with each class that is serialized to the instant execution cache, and use this to make class lookup on deserialize faster and to deal correctly with multiple classes with the same name.

Move some ClassLoader lifecycling from Groovy DSL script compilation to `ClassLoaderScope`, so that the scope takes care of creating and caching the script ClassLoader.

    • -3
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 30 more files in changeset.
Revert "Reinstate "Let instant execution reuse classloaders when loading""

    • -7
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 36 more files in changeset.
Revert "Revert "Let instant execution reuse classloaders when loading""

    • -2
    • +7
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 36 more files in changeset.
Revert "Let instant execution reuse classloaders when loading"

    • -7
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 36 more files in changeset.
Simplify ScriptCompiler.compile() contract

Not requiring the ClassLoader anymore but only the ClassLoaderScope

as all implementations now use the export loader from the given scope.

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -3
    • +4
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Simplify ScriptCompiler.compile() contract

Not requiring the ClassLoader anymore but only the ClassLoaderScope

as all implementations now use the export loader from the given scope.

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -3
    • +4
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Simplify ScriptCompiler.compile() contract

Not requiring the ClassLoader anymore but only the ClassLoaderScope

as all implementations now use the export loader from the given scope.

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -3
    • +4
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Simplify ScriptCompiler.compile() contract

Not requiring the ClassLoader anymore but only the ClassLoaderScope

as all implementations now use the export loader from the given scope.

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -3
    • +4
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Simplify ScriptCompiler.compile() contract

Not requiring the ClassLoader anymore but only the ClassLoaderScope

as all implementations now use the export loader from the given scope.

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -3
    • +4
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Artificially create a class loader scope for Groovy script classes

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -2
    • +6
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Artificially create a class loader scope for Groovy script classes

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -2
    • +6
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Artificially create a class loader scope for Groovy script classes

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -2
    • +6
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Artificially create a class loader scope for Groovy script classes

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -2
    • +6
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Artificially create a class loader scope for Groovy script classes

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -2
    • +6
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Artificially create a class loader scope for Groovy script classes

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -2
    • +6
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Artificially create a class loader scope for Groovy script classes

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -2
    • +6
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Artificially create a class loader scope for Groovy script classes

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -2
    • +6
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Artificially create a class loader scope for Groovy script classes

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -2
    • +6
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 14 more files in changeset.
Moved internal logging classes from 'core' to 'logging' project.

    • -1
    • +1
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 418 more files in changeset.
Renamed `o.g.internal.resource.Resource` to `TextResource`.

    • -2
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 35 more files in changeset.
Added some query methods to `Resource` and use these instead of instanceof checks in several places.

    • -0
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 13 more files in changeset.
Revert "Revert reuse of file snapshotter across builds (investigate failing test)"

This reverts commit 14615d32c02f514bb4fc2a578474cad2a0bda12f.

    • -4
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 12 more files in changeset.
Revert reuse of file snapshotter across builds (investigate failing test)

This reverts commit c5a7b0e10097a2165fc7aa7470df7a68d8e3c5f5 and commit 6df9c3e143038b77e53148f6a2dccfc172b1c1c9.

    • -2
    • +4
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 12 more files in changeset.
Get rid of ShortCircuitEmptyScriptCompiler

This commit removes `ShortCircuitEmptyScriptCompiler` that was causing unnecessary reads of build script contents, while on the other hand being pretty weak in detecting empty scripts.

    • -4
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 10 more files in changeset.
Removed unused parameter from a few places.

    • -2
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 16 more files in changeset.
Fixes for class loader caching.

We weren't distinguishing between runtime loaders for the different passes of a build script. This meant that if a script contained a `buildscript {}` block, then we'd cache the loader for the first pass. We'd then run the second path with the same loader id, and a different effective loader. This would evict the first pass loader, which would then be evicted on the next build etc. The build script class loader ids now indicate the phase, allowing both loaders to be cached.

We weren't releasing loaders when scripts disappeared. We now explicitly “remove” runtime script loaders if the script is empty. This also required giving empty and missing scripts) identity, in terms of the file that should have contained the script.

Reworking the testing infrastructure raised these issues, and some other bad assumptions that the tests were incorrectly attempting to assert.

+review REVIEW-5411

    • -5
    • +13
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 31 more files in changeset.
Remove some layering in the compile transformer stuff to make things less tangled.

+review REVIEW-5395

    • -2
    • +2
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 42 more files in changeset.
Simplify ScriptCompiler interface.

The setter methods made it mutable, and made it easy to use it in an invalid state.

+review REVIEW-5395

    • -6
    • +3
    ./DefaultScriptCompilerFactoryTest.groovy
  1. … 5 more files in changeset.