InterpreterTest.kt

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Invalidate instant execution cache upon changes to Kotlin scripts

By making the Kotlin DSL interpreter emit `onScriptClassLoaded` events.

At this point we don't yet make a distinction between init scripts and other

types of scripts.

  1. … 10 more files in changeset.
Invalidate instant execution cache upon changes to Kotlin scripts

By making the Kotlin DSL interpreter emit `onScriptClassLoaded` events.

At this point we don't yet make a distinction between init scripts and other

types of scripts.

  1. … 10 more files in changeset.
Fix for previous commit.

  1. … 4 more files in changeset.
Fix for previous commit.

  1. … 4 more files in changeset.
Fix `ClassNotFoundExeception` when loading objects whose class is defined in a build script from the instant execution cache, after recreating the cache from a daemon process that has previously successfully used the cache.

For example, running `gradle taskA`, `gradle taskA`, `gradle taskB`, `gradle taskB` would fail if `taskB` uses types from a build script.

This was happening because the script ClassLoaders are cached and reused, but the association between ClassLoader and scope was lost, and this association is what instant execution uses to know how to load the class.

This change fixes one case of this problem, but the same problem can still happen if the set of build scripts being referenced changes.

  1. … 25 more files in changeset.
Fix `ClassNotFoundExeception` when loading objects whose class is defined in a build script from the instant execution cache, after recreating the cache from a daemon process that has previously successfully used the cache.

For example, running `gradle taskA`, `gradle taskA`, `gradle taskB`, `gradle taskB` would fail if `taskB` uses types from a build script.

This was happening because the script ClassLoaders are cached and reused, but the association between ClassLoader and scope was lost, and this association is what instant execution uses to know how to load the class.

This change fixes one case of this problem, but the same problem can still happen if the set of build scripts being referenced changes.

  1. … 25 more files in changeset.
TEMPORARY CHANGES

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

  1. … 4 more files in changeset.
TEMPORARY CHANGES

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

  1. … 4 more files in changeset.
Fix Kotlin metadata, project accessors classpath and DSL tests

by fixing script compilation classpath fixture now that test

dependencies are project modules instead of generated API JARs

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

  1. … 7 more files in changeset.
Import :kotlin-dsl and :kotlin-dsl-test-fixtures

Both in one go because of their circular dependency

Tests are failing because of the lack of :customInstallation

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

    • -0
    • +230
    ./InterpreterTest.kt
  1. … 536 more files in changeset.