Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Replace usages of org.gradle.api.Nullable

With javax.annotation.Nullable.

  1. … 460 more files in changeset.
Improve fully qualified representation of nested model types

Use `.` instead of `$` to separate the enclosing type name from the

nested type name.

  1. … 24 more files in changeset.
Use parameter types in method descriptor

+review REVIEW-5921

  1. … 27 more files in changeset.
Introduce `getLinkNames` on `MutableModelNode`

This avoids calling `ensureAtLeast` on target links to determine the name of the tasks.

+review REVIEW-5921

  1. … 4 more files in changeset.
Do not allow changing target once reference node is discovered

If the target of a reference node can change once it has been

discovered, then it might change the types the node can be viewed as.

If the “type” of the node changes, so do the rules that apply to it.

Hence changing the type of the node after some by-type rules have been

already applied to it would mean those rules should never have been

applied in the first place.

To avoid a situation like this, we need to lock down the target of a

reference node as soon as it is discovered.

+review REVIEW-5821

  1. … 2 more files in changeset.
Simplify setting target for new reference node

+review REVIEW-5821

  1. … 6 more files in changeset.
Moved nested classes to top-level for IBM JDK6 +review REVIEW-5808

    • -0
    • +28
    • -0
    • +27
Test for not applying rule to scope node

+review REVIEW-5808

Test for not applying rule to scope node

+review REVIEW-5808

Test for not applying rules to descendants accessible via references

+review REVIEW-5808

Test applying rules to each child element with given type

+review REVIEW-5808

Store rule definition in extracted rule

  1. … 13 more files in changeset.
Revert "Promote o.g.model/{internal/core/rule/describe=>}/ModelRuleDescriptor"

This reverts commit de9e06338062d7ff2933717e1c30fbf0fb6c50d2 following a

review in which we determined that letting the indirect cycle persist is

a lesser evil that promoting ModelRuleDescriptor to public status.

Note again that the original commit, nor this reversion of it has any

impact on Classycle errors, as it appears to be incapable of detecting

this kind of (very common) cycle.

  1. … 84 more files in changeset.
Changed the implementation for binding by-type model references so that it is much more efficient.

In particular, changed `RuleBindings` to reuse the result of a (scope, type) match for all later references to that (scope, type).

Also separately handle untyped by-path references and by-path + by-type references to reduce the amount of work done when a node becomes known and when a node's type information becomes available.

Added more unit test coverage for `RuleBindings`.

  1. … 3 more files in changeset.
Expose bindings store to rule extractor

+review REVIEW-5761

  1. … 5 more files in changeset.
Promote o.g.model/{internal/core/rule/describe=>}/ModelRuleDescriptor

Much like the previous commit, this change resolves an indirect package

cycle. Unlike the previous commit, however, it does so by promoting a

previously intenal type (ModelRuleDescriptor) to public API status.

There are several exception types resident in org.gradle.model that

depend on ModelRuleDescriptor and expose that dependency through their

constructors. This alone provides a rationale for promoting

ModelRuleDescriptor to public status, and resolving the cycle is now an

additional motivation.

Note that while the package structure within on the internal side was

org.gradle.model.internal.core.rule.describe, ModelRuleDescriptor has

been promoted here directly to org.gradle.model, i.e. the

core.rule.describe subpackaging has not been mirrored into the public

package structure. The reason for doing this is to avoid introducing a

dependency from a higher level package (org.gradle.model) to a

subpackage. In general, package dependencies should always flow upward

from subpackages to parent packages in a given hierarchy, and not the

other way around. There are many counterexamples of this throughout the

codebase today, but that is no reason to perpetuate the practice.

  1. … 82 more files in changeset.
Added some more unit test coverage for `RuleBindings`.

Inlined `ModelListener.matches()` into `onDiscovered()`.

  1. … 3 more files in changeset.
Changed `ModelPredicate` back to represent a fixed set of criteria. Pushed the `matching()` method down to subclasses.

The intention is to present a small and fixed set of criteria to the rule binding infrastructure, which is a major hotspot, to allow an implementation that is efficient given this small set of criteria, and open up the set of criteria the further one travels from the rule binding infrastructure.

  1. … 8 more files in changeset.
Busted out inner class as an attempt to fix unit test on ibm jvm.

Added a rough implementation of `MutableModeNode.applyToSelf()` for reference model nodes.

    • -16
    • +43
  1. … 7 more files in changeset.
`ModelAction` no longer needs to be parameterized.

  1. … 35 more files in changeset.
Reworked interaction between rule source extractor and the extracted rules, to allow implicit inputs and other state to be attached to rule actions.

+review REVIEW-5756

  1. … 17 more files in changeset.
allLinksTransitive => allDescendants

+review REVIEW

  1. … 7 more files in changeset.
Removed an unused constructor.

+review REVIEW-5756

  1. … 1 more file in changeset.
Reworked the parameters to `ExtractedModelRule.apply()` so that per-application context, such as explicit bindings, can be provided.

+review REVIEW-5756

  1. … 12 more files in changeset.
Allow a rule source to be applied to a model node using an `ExtractedRuleSource` instead of a `Class`.

This allows the `ExtractedRuleSource` to be contextualized in some way, for example, explicit input bindings.

+review REVIEW-5756

  1. … 9 more files in changeset.
Introduced a type to represent an inspected rule source.

Previously this was represented as a set of rule methods. Introducing a type will allow meta-data that applies to the rule source as a whole, such as implicit inputs, to be captured.

+review REVIEW-5756

  1. … 13 more files in changeset.
Moved some classes from o.g.model.internal.core to o.g.model.internal.inspect.

Also moved a class that was only used by a single test to live in that test class.

+review REVIEW-5756

  1. … 27 more files in changeset.
Introduced a schema extraction strategy for `RuleSource` and reuse the schema store for model rule extraction.

This means that consistent inspections and constraints for properties and state can be applied to `RuleSource` and `@Managed` types, and that the schema for a `RuleSource` can reference the schemas for model element types (and vice versa potentially, or at least we can understand when this is happening and complain about it).

+review REVIEW-5756

  1. … 9 more files in changeset.