testFixtures

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Moved registration of `BinarySpec.tasks` from `BinaryBasePlugin` to `BaseBinarySpec`.

Also use the descriptor of a `BinarySpec` or `ComponentSpec` as the descriptor for its children, consistent with the approach used for the children of a struct.

  1. … 15 more files in changeset.
Fixed broken unit tests that expect the tasks for a binary to be defined.

Moved some rules from `ComponentBasePlugin` to `BinaryBasePlugin` so that it can be applied without error.

Added some unit test coverage for `BinaryBasePlugin`.

  1. … 4 more files in changeset.
Split `BinaryBasePlugin` out of `LanguageBasePlugin`.

  1. … 7 more files in changeset.
Extracted a base specification which can be used for writing software model plugin unit tests, from various existing unit tests.

  1. … 4 more files in changeset.
Manage creation of most PatternSet instances

- use managed CachingPatternSpecFactory instance for

these PatternSet instances

+review REVIEW-5627

  1. … 37 more files in changeset.
Moved a bunch of singletons off several prod classes to live on `ProjectRegistrySpec`.

+review REVIEW-5756

  1. … 30 more files in changeset.
Merge LanguageRegistry into LanguageSourceSetFactory

Introduce `LanguageRegistry getRegistrations()` in

`LanguageSourceSetFactory`.

Get rid of `languages` node and rules that used to propagate

language registrations to `LanguageSourceSetFactory`.

Along the way, `LanguageRegistration` used in `LanguageRegistry` has

been reduced to only contains necessary data.

It no longer needs the data used for factory registration.

Other changes are impacts, mostly in tests.

+review REVIEW-5734

  1. … 10 more files in changeset.
Simplify ModelRegistrations

Make the purpose of actions added during registration a bit cleaner,

too.

+review REVIEW-5738

  1. … 7 more files in changeset.
Rework extensible type fixtures to simplify code

+review REVIEW-5695

  1. … 11 more files in changeset.
Make extensible type fixtures work with managed types

Things that had to be cleared up:

- not all Base*Fixtures classes were creating nodes with managed

projections

- some tests were using a separate ManagedProxyFactory, and the same

type got generated twice in the same classloader

+review REVIEW-5695

  1. … 14 more files in changeset.
Fixed `BaseLanguageSourceSetFixture` so that it returns a view of the source set with all the DSL magic mixed in, rather than the base implementation.

+review REVIEW-5708

Fixed some merge problems.

+review REVIEW-5708

  1. … 6 more files in changeset.
Do not use the legacy decoration on the delegate objects created for `ComponentSpec`, `BinarySpec` and `LanguageSourceSet` elements.

+review REVIEW-5708

  1. … 25 more files in changeset.
Minor edits polishing changes made while CompSpec managed work

- various renames, among them overriden -> overridden

- remove now spurious files

- opportunistically remove useless printlns in tests

- fix some groovy warning in tests

+review REVIEW-5695

  1. … 8 more files 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.

  1. … 15 more files in changeset.
Introduce node backed protected BaseBinarySpec.getComponentAs(type)

Binaries are owned by a Component. NativeComponentSpec expose it via its

`getComponent` method. This method is then overriden by subtypes to

specialize its return type.

BaseBinarySpec store a direct reference to some ComponentSpecInternal in

its `owner` field and its `getComponent` method basically returns it.

Specialized versions of this method presents in subtypes simply cast

`owner`. This ComponentSpecInternal happens to be the `privateData` of

the backing node which can't be cast to the corresponding managed public

type (eg. CUnitTSS, GoogleTestTSS).

This commit starts in BaseBinarySpec:

- replace the `owner` field by a `componentNode`

- introduce protected getComponentAs(type) with relies on

`node.asImmutable(type)` insted of casting

With theses changes, a `BinarySpec` can be owned by a

`@Managed ComponentSpec`.

BaseBinarySpec creation now use a node instead of a

ComponentSpecInternal to refer to its owner component. This explain the

impact on fixtures and tests.

Removed spurious specialized getComponent() methods in NativeBinarySpec

subtypes along the way.

+review REVIEW-5695

  1. … 19 more files in changeset.
Move ModelRegistryHelper functionality to Groovy extension module

+review REVIEW-5715

  1. … 19 more files in changeset.
Use the public type of a `LanguageSourceSet` in its display name.

+review REVIEW-5708

  1. … 20 more files in changeset.
Use a consistent `toString()` and `displayName` for all ComponentSpec views, regardless of whether the view is `@Managed` or not.

Four parts to this change:

1. Shuffled around the API of `InstanceFactory` so that there is less difference between elements with `@Managed` and unmanaged public types from a consumer's perspective.

2. Changed the API of `InstanceFactory` so that factories are presented with the public type of the element.

3. Changed how `BaseComponentSpec` instances are created so that thier public type is used in there display name.

4. Changed view generation so that `toString()` implementation will use the delegate's display name, if present.

+review REVIEW-5708

  1. … 18 more files in changeset.
Use `ModelType` instead of `Class` in `LanguageRegistration`

  1. … 10 more files in changeset.
Introduce convenience methods on ModelRegistry

+review REVIEW-5685

  1. … 24 more files in changeset.
BaseBinarySpec.sources is a node-backed ModelMap

  1. … 22 more files in changeset.
Use a real `ModelMap` for `ComponentSpec.sources`

This commit removes the backing `FunctionalSourceSet` instance from `BaseComponentSpec`,

instead using a real `ModelMap` implementation backed by a `ModelNode`. This removes

a lot of complexity from the implementation of `BaseComponentSpec`, as well as

making the behaviour of `ComponentSpec.sources` consistent with other `ModelMap`

properties.

Each `LanguageSourceSet` requires a 'parentName' property to be set, which is used

for providing a project-scoped unique name as well as source default locations.

For an element in `ComponentSpec.sources`, the 'parentName' is equal to the owning

component name. To make this possible, `LanguageSourceSetNodeIntializer` is now

aware of this relationship, and will set the 'parentName' appropriately. This is

somewhat consistent with the way the `owner` component is set when constructing

a `BaseBinarySpec` instance.

Notes:

- Elements of `ComponentSpec.sources` are now configured on demand.

- Deleted tests that verified sources sets couldn't be removed: these are

no longer relevant with a `ModelMap` implementation.

Issue: gradle/langos#40 +review REVIEW-5681

  1. … 8 more files in changeset.
Rename ModelRegistry.create() to register() +review REVIEW-5678

  1. … 67 more files in changeset.
Remove unused ProjectSourceSet

+review REVIEW-5669

  1. … 16 more files in changeset.
Allow A LanguageSourceSet of any registered type to be created via FunctionalSourceSet

- Adds languageRegistry to FSS

- LSS creation uses FSS's LanguageRegistry

- Don't push language factories into FSS

- Add a basDir property to FSS for initializing LSS's with a default source directory

- Remove language source set factory registration from ComponentRules

  1. … 15 more files in changeset.
Put `NodeInitializerRegistry` under project scope

+review REVIEW-5629

  1. … 6 more files in changeset.
Fixed tests

+review REVIEW-5629

  1. … 2 more files in changeset.
Adds a ConstructableTypesRegistry to create types that are not strictly 'managed' - NodeInitializerExtractionStrategy's can be asked what types they support - Fails the build when NodeInitializerRegistry can not find an appropriate node initializer - Removes managed type check ModelDslBacking's

+review REVIEW-5619

  1. … 40 more files in changeset.