collection

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Coalesce o.g.m.{collection.internal=>internal.core}

This change removes a "feedback dependency" at the package level, which

is an indirect form of a package cycle.

In this case, collection.internal.ModelMapModelProjection depended on

internal.manage.instance.ManagedInstance while at the same time types in

internal.manage.extract depended on

collection.internal.ChildNodeInitializerStrategy* types.

So while there was no direct cycle between any two packages, there was

a an indirect cycle or between different subpackages of

collection.internal and collection.manage.

Indirect cycles are just as indicative of a design problem as their

direct counterparts, but unfortunately it appears that Classycle is not

capable of detecting them. Fortunately, other tools are. This screenshot

taken from Structure101 Studio visualizes the indirect cycle described

above: https://imgur.com/00FyduF.

It appears that the presence of these types in collection.internal was

probably an oversight to begin with. This package did start out with

proper collection types such as DefaultManagedSet and

DefaultCollectionBuilder, but these were removed quite some time ago in

commit 699abb21985e8126742007cb2e0daeae34316756. As such, this commit

resolves the indirect cycle simply by moving the offending types from

collection.internal into internal.core, where they look to be a better

fit anyway.

    • -24
    • +0
    ./internal/ChildNodeInitializerStrategyAccessor.java
    • -42
    • +0
    ./internal/ChildNodeInitializerStrategyAccessors.java
    • -171
    • +0
    ./internal/ModelMapModelProjection.java
  1. … 10 more files in changeset.
Merged `ModelPromise.canBeViewedAsMutable()` and `canBeViewedAsImmutable()` as the set of types is always the same.

This avoids doing a compatibility check twice on non match (once for immutable and once for mutable). This check is a hotspot at configuration time.

    • -10
    • +3
    ./internal/ModelMapModelProjection.java
  1. … 22 more files in changeset.
Removed deprecated `CollectionBuilder` and `ManagedSet` types.

    • -12
    • +2
    ./internal/ModelMapModelProjection.java
  1. … 17 more files in changeset.
Remove NodeBackedModelMap.eager

It’s not needed anymore

+review REVIEW-5738

    • -1
    • +1
    ./internal/ModelMapModelProjection.java
  1. … 1 more file in changeset.
No need to track implicit dependencies

We weren’t really using this feature, either, just passing empty lists

(or even nulls) around, and never using them.

    • -2
    • +1
    ./internal/ModelMapModelProjection.java
  1. … 16 more files in changeset.
Enabled nested DSL rules for the `tasks` container.

For example, `tasks { mytask(Task) { ... } }`. The closures passed to the delegate methods of `tasks { }` will be treated as nested rules. This means, in particular, that a task may now be created or configured via the DSL using another task as input.

    • -10
    • +9
    ./internal/ModelMapModelProjection.java
  1. … 1 more file in changeset.
Enable nested DSL rules for subjects of type `ModelMap`.

This is the first step of enabling the DSL for creating and configuring items in a `ModelMap`. It is currently only supported for `name(Type) { ... }` and `name { ... }` syntax.

With this change, the closures in the syntax above are treated as rule actions, so that their input references are not treated as inputs for the outer closure but are instead treated as inputs of the nested rule. These actions are also given their own descriptor.

    • -1
    • +2
    ./internal/ModelMapModelProjection.java
  1. … 3 more files in changeset.
Changed `ModelMapGroovyDecorator` so that it is used as the superclass for each `ModelMap` view implementation.

    • -1
    • +1
    ./internal/ModelMapModelProjection.java
  1. … 10 more files in changeset.
Better name for `ChildNodeInitializerStrategyAccessors.constant()`

+review REVIEW-5629

    • -1
    • +1
    ./internal/ChildNodeInitializerStrategyAccessors.java
  1. … 6 more files in changeset.
Register node initializers via rules

+review REVIEW-5629

    • -0
    • +24
    ./internal/ChildNodeInitializerStrategyAccessor.java
    • -0
    • +42
    ./internal/ChildNodeInitializerStrategyAccessors.java
    • -9
    • +10
    ./internal/ModelMapModelProjection.java
  1. … 49 more files in changeset.
Rename readonly to immutable and writable to mutable to better describe the intent

+review REVIEW-5608

    • -5
    • +5
    ./internal/ModelMapModelProjection.java
  1. … 16 more files in changeset.
Use NodeInitializer to back ChildNodeCreatorStrategy (and rename).

+review REVIEW-5561

    • -5
    • +5
    ./internal/ModelMapModelProjection.java
  1. … 11 more files in changeset.
Move state handling from ModelMapGroovyDecorator to NodeBackedModelMap.

    • -12
    • +9
    ./internal/ModelMapModelProjection.java
  1. … 8 more files in changeset.
Make model map respect mutability WRT the child views it exposes.

+review REVIEW-5514

    • -1
    • +1
    ./internal/ModelMapModelProjection.java
  1. … 3 more files in changeset.
Add back, a deprecated, ManagedSet.

+review

  1. … 17 more files in changeset.
Support ModelMap as a managed type.

+review

    • -11
    • +28
    ./internal/ModelMapModelProjection.java
  1. … 39 more files in changeset.
Expose ComponentSpec.source() as a node backed model map, instead of a domain object collection wrapped model map.

+review REVIEW-5498

    • -4
    • +6
    ./internal/ModelMapModelProjection.java
  1. … 39 more files in changeset.
Rename org.gradle.model.collections.ManagedSet to org.gradle.model.ModelSet.

  1. … 26 more files in changeset.
Moves the logic to determine a nodes value to UnmanagedModelProjection - Adds some javadoc - Removes unnecessary NodeValueDescriptor

+review REVIEW-5501

    • -2
    • +1
    ./internal/ModelMapModelProjection.java
  1. … 10 more files in changeset.
Does not display model node values as object addresses

+review REVIEW-5501

    • -6
    • +4
    ./internal/ModelMapModelProjection.java
  1. … 11 more files in changeset.
Refactors model report post code review

+review REVIEW-5501

    • -0
    • +9
    ./internal/ModelMapModelProjection.java
  1. … 21 more files in changeset.
Tweaks to type signature

    • -4
    • +4
    ./internal/ModelMapModelProjection.java
  1. … 2 more files in changeset.
Move type token factory for model maps to ModelTypes.

    • -1
    • +2
    ./internal/ModelMapModelProjection.java
  1. … 11 more files in changeset.
Inline AbstractModelMap into DefaultModelMap, and rename to NodeBackedModelMap.

    • -2
    • +2
    ./internal/ModelMapModelProjection.java
  1. … 17 more files in changeset.
Simplify collection bridging, and ModelMap implementations in general.

- Ancillary nodes are no longer needed to back model maps

- Remove custom projections for bridged vs backed model map views

Some supporting ModelMap infrastructure has moved from platform-base to core. We've now broken all the linkage between ModelMap et al. and the containers, but still link against the instantiator types. With a little more work we could move the instantiator base types to, say, base-services, and move all ModelMap infrastructure out to model-core.

    • -7
    • +18
    ./internal/ModelMapModelProjection.java
  1. … 48 more files in changeset.
Reuse ModelMapModelView in SpecializedModelMapProjection, so that the specialized view is no longer a wrapper over the generic view. Instead, both views delegate directly to the map implementation.

    • -8
    • +9
    ./internal/ModelMapModelProjection.java
  1. … 8 more files in changeset.
Moved class from core to modelCore.

    • -0
    • +153
    ./internal/ModelMapModelProjection.java
  1. … 1 more file in changeset.
Introduce ModelMap extends CollectionBuilder and allow to use them interchangeably in rules

+review REVIEW-5491

  1. … 117 more files in changeset.
Add values() to CollectionBuilder and use it instead of iterator(). CollectionBuilder no longer implements Iterable.

+review REVIEW-5457

  1. … 12 more files in changeset.
Javadocs for managed/managedSet.

+review REVIEW-5450

  1. … 1 more file in changeset.