instantiation

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix convention mapping applied to a property with a setter with a covariant return type.

    • -6
    • +40
    ./generator/AsmBackedClassGeneratorTest.java
  1. … 1 more file in changeset.
Add `BuildServiceParameters.None` marker type that is used to indicate that a build service does not take any parameters, to match the pattern used in other places.

Extract some validation logic from several places so it can be reused in the places where parameterized isolated objects, such as artifact transforms or build services, are registered.

    • -8
    • +8
    ./generator/AsmBackedClassGeneratorTest.java
    • -11
    • +11
    ./generator/DependencyInjectingInstantiatorTest.groovy
    • -7
    • +7
    ./generator/DependencyInjectionUsingLenientConstructorSelectorTest.groovy
  1. … 33 more files in changeset.
Support managed properties of type `DomainObjectSet<T>`.

    • -0
    • +11
    ./generator/AsmBackedClassGeneratedManagedStateTest.groovy
    • -0
    • +5
    ./generator/AsmBackedClassGeneratorTest.java
  1. … 5 more files in changeset.
Remove unused import

    • -1
    • +0
    ./generator/AsmBackedClassGeneratorTest.java
Remove some unnecessary in-memory caching from the "lenient" instantiation scheme. This caching duplicates the caching that already happens in the class generator.

    • -2
    • +1
    ./generator/DependencyInjectionUsingLenientConstructorSelectorTest.groovy
  1. … 4 more files in changeset.
Change instant execution serialization to handle abstract model types.

Reuse the approach used to serialize the state of abstract task types.

    • -12
    • +24
    ./generator/DefaultInstantiationSchemeTest.groovy
  1. … 9 more files in changeset.
Change the implementation of `DeserializationInstantiator` so that services and other Gradle-provided state is injected into the instances it creates, to match the state that is injected into the instances created by the `Instantiator` for the same instantiation scheme.

    • -0
    • +6
    ./generator/AbstractClassGeneratorSpec.groovy
    • -1
    • +10
    ./generator/AsmBackedClassGeneratedManagedStateTest.groovy
    • -0
    • +12
    ./generator/AsmBackedClassGeneratorTest.java
    • -5
    • +5
    ./generator/IdentityClassGenerator.java
  1. … 5 more files in changeset.
Change the various `Report` implementations to be abstract and remove some wiring.

Also fix the class generator to handle an abstract getter from a super class whose return type is not supported for managed properties, but which is overridden by another getter whose return type is supported (eg a `Provider<T>` getter overridden by a `Property<T>` getter).

    • -1
    • +9
    ./generator/AsmBackedClassGeneratedManagedStateTest.groovy
    • -0
    • +18
    ./generator/AsmBackedClassGeneratorTest.java
  1. … 4 more files in changeset.
Support `ConfigurableFileTree` and `NamedDomainObjectContainer<T>` for managed properties (that is, abstract read-only properties where Gradle provides an implementation).

    • -0
    • +24
    ./generator/AsmBackedClassGeneratedManagedStateTest.groovy
    • -0
    • +15
    ./generator/AsmBackedClassGeneratorTest.java
  1. … 4 more files in changeset.
Generate a display name for nested objects that are created for managed properties.

    • -2
    • +5
    ./generator/AbstractClassGeneratorSpec.groovy
    • -5
    • +15
    ./generator/AsmBackedClassGeneratedManagedStateTest.groovy
    • -3
    • +5
    ./generator/AsmBackedClassGeneratorTest.java
    • -2
    • +2
    ./generator/IdentityClassGenerator.java
  1. … 5 more files in changeset.
Tweak test names

    • -2
    • +2
    ./generator/AsmBackedClassGeneratorDecoratedTest.groovy
Fix verify error when decorating class that has action methods or constructors with wide parameters.

Long and double takes 2 stack slots, but AsmBackedClassGenerator doesn't count it in mind and creates incorrect bytecode for methods like these:

void name(long arg, Action action)

<init>(double arg, Object any)

(when wide parameter isn't last argument in general case).

Signed-off-by: Sergey Shatunov <me@prok.pw>

    • -0
    • +73
    ./generator/AsmBackedClassGeneratorDecoratedTest.groovy
  1. … 1 more file in changeset.
Attach a display name to the value of `Property` typed properties for decorated types.

In this commit, this is applied only to read-only properties with non-final getters.

    • -7
    • +43
    ./generator/AsmBackedClassGeneratorDecoratedTest.groovy
  1. … 5 more files in changeset.
Attach a display name to the value of `Property` typed properties for decorated types.

In this commit, this is applied only to read-only properties with final getters.

    • -0
    • +44
    ./generator/AsmBackedClassGeneratorDecoratedTest.groovy
  1. … 5 more files in changeset.
Include some information about the owning task or extension object in the display name for a managed `Property<T>` instance.

    • -0
    • +9
    ./generator/AbstractClassGeneratorSpec.groovy
    • -13
    • +9
    ./generator/AsmBackedClassGeneratedManagedStateTest.groovy
  1. … 7 more files in changeset.
Generate a basic display name for `Property` instances created as the value for a read-only managed property. Use the display name in 'this property has no value' error messages to help with problem diagnosis.

The display name could include some more context, could be used in more error messages, and be applied to more things. This commit is simply an incremental improvement and later changes will improve diagnostics further.

    • -3
    • +6
    ./generator/AbstractClassGeneratorSpec.groovy
    • -4
    • +22
    ./generator/AsmBackedClassGeneratedManagedStateTest.groovy
  1. … 24 more files in changeset.
Move some classes around to bust up a package cycle.

    • -60
    • +0
    ./AbstractClassGeneratorSpec.groovy
    • -39
    • +0
    ./AbstractClassGeneratorTestGroovy.groovy
    • -262
    • +0
    ./AsmBackedClassGeneratedManagedStateTest.groovy
    • -612
    • +0
    ./AsmBackedClassGeneratorDecoratedTest.groovy
    • -470
    • +0
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
    • -110
    • +0
    ./AsmBackedClassGeneratorInjectUndecoratedTest.groovy
    • -1894
    • +0
    ./AsmBackedClassGeneratorTest.java
    • -72
    • +0
    ./DefaultInstantiationSchemeTest.groovy
    • -98
    • +0
    ./DefaultInstantiatorFactoryTest.groovy
    • -428
    • +0
    ./DependencyInjectingInstantiatorTest.groovy
    • -157
    • +0
    ./DependencyInjectionUsingClassGeneratorBackedInstantiatorTest.groovy
    • -217
    • +0
    ./DependencyInjectionUsingLenientConstructorSelectorTest.groovy
  1. … 46 more files in changeset.
Generate a `toString()` implementation for extension objects added using `create()`, if the extension class does not provide one.

    • -6
    • +14
    ./AbstractClassGeneratorSpec.groovy
    • -0
    • +47
    ./AsmBackedClassGeneratorDecoratedTest.groovy
    • -0
    • +6
    ./AsmBackedClassGeneratorInjectUndecoratedTest.groovy
  1. … 23 more files in changeset.
Merge branch 'master'

    • -21
    • +5
    ./AsmBackedClassGeneratedManagedStateTest.groovy
  1. … 1 more file in changeset.
Allow managed factories to be recreatable in worker processes

    • -17
    • +4
    ./AsmBackedClassGeneratedManagedStateTest.groovy
    • -2
    • +1
    ./AsmBackedClassGeneratorDecoratedTest.groovy
    • -9
    • +8
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
    • -4
    • +3
    ./AsmBackedClassGeneratorInjectUndecoratedTest.groovy
    • -2
    • +1
    ./DefaultInstantiatorFactoryTest.groovy
    • -2
    • +1
    ./DependencyInjectionUsingClassGeneratorBackedInstantiatorTest.groovy
  1. … 20 more files in changeset.
Improve error messages for managed factories

  1. … 3 more files in changeset.
Fixed managed property generation for `Property<T>` types where `T` is a parameterized type.

    • -5
    • +8
    ./AsmBackedClassGeneratedManagedStateTest.groovy
  1. … 4 more files in changeset.
Use a factory id rather than the public class for identifying managed factories

    • -6
    • +6
    ./AsmBackedClassGeneratedManagedStateTest.groovy
  1. … 20 more files in changeset.
Move managed factories to a registry

    • -7
    • +11
    ./AsmBackedClassGeneratedManagedStateTest.groovy
    • -1
    • +2
    ./AsmBackedClassGeneratorDecoratedTest.groovy
    • -8
    • +9
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
    • -3
    • +4
    ./AsmBackedClassGeneratorInjectUndecoratedTest.groovy
    • -1
    • +2
    ./DefaultInstantiatorFactoryTest.groovy
    • -1
    • +2
    ./DependencyInjectionUsingClassGeneratorBackedInstantiatorTest.groovy
  1. … 42 more files in changeset.
Cache the constructors used to create task instances when reading from the instant execution cache.

    • -1
    • +1
    ./DefaultInstantiationSchemeTest.groovy
  1. … 2 more files in changeset.
Copy the caching strategy of `NamedObjectInstantiator` to `CrossBuildInMemoryCacheFactory` so that it can be reused, and use it to cache the details of generated classes.

    • -2
    • +3
    ./AsmBackedClassGeneratedManagedStateTest.groovy
    • -2
    • +3
    ./AsmBackedClassGeneratorDecoratedTest.groovy
    • -8
    • +9
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
    • -3
    • +4
    ./AsmBackedClassGeneratorInjectUndecoratedTest.groovy
    • -1
    • +1
    ./DependencyInjectionUsingClassGeneratorBackedInstantiatorTest.groovy
  1. … 10 more files in changeset.
Inline org.gradle.testing.internal.util.Specification

    • -1
    • +1
    ./DependencyInjectionUsingLenientConstructorSelectorTest.groovy
  1. … 53 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.
Do not run the constructors of tasks that are deserialized from the instant execution cache.

    • -0
    • +72
    ./DefaultInstantiationSchemeTest.groovy
  1. … 21 more files in changeset.
Generate read-only user type properties

    • -1
    • +18
    ./AsmBackedClassGeneratedManagedStateTest.groovy
  1. … 5 more files in changeset.