Goal
Replace the current per-fragment extensions (Instance.Extension, Party.Extension, Place.Extension) with a single Diffo.Provider.Extension used by all three base fragments.
New DSL shape
All provider resources declare a single top-level provider do section. The available entities inside it depend on which base fragment is in use, enforced by verifiers.
Instance resource:
provider do
specification do
id "da9b207a-..."
name "DSL Access Service"
major_version 1
end
characteristic :downstream_speed, MyApp.Speed
feature :voice, is_enabled?: false
party :provider, MyApp.RSP
parties :installer, MyApp.Engineer, constraints: [min: 1, max: 3]
party_ref :owner, MyApp.Organization
place :site, MyApp.GeographicSite
place_ref :billing_address, MyApp.Address
behaviour do
actions do
create :build
end
end
end
Party or Place resource:
provider do
role :provider, MyApp.BroadbandService
role :operator, MyApp.Cluster
end
Key design decisions
party/parties and place/places declare direct edges (create a PartyRef/PlaceRef node). party_ref/party_refs and place_ref/place_refs declare reference relationships (no direct edge — replaces reference: true option). The intent is explicit in the keyword rather than an option.
behaviour do moves inside provider do rather than being a peer section.
role stays as the keyword for Party/Place resources declaring their participation in instances and other parties/places.
- All base fragments (
BaseInstance, BaseParty, BasePlace) reference the single Diffo.Provider.Extension.
What unifies
- One extension module → one
Diffo.Provider.Extension.Info introspection module
- One cheat sheet (
DSL-Diffo.Provider.Extension.md)
- Verifiers collapse —
verify_roles.ex currently duplicated across instance/party/place extension verifier directories becomes one set
mix.exs spark aliases, .formatter.exs spark_locals_without_parens, and igniter installer all reference a single extension
- Transformers/persisters are already entity-driven; mostly path consolidation
Breaking change
This is a 0.3.0 breaking change. Migration is straightforward:
structure do ... end + behaviour do ... end → provider do ... end
instances do role ... end / parties do role ... end → provider do role ... end
party :x, M, reference: true → party_ref :x, M
No igniter upgrade task for 0.3.0 (consumer base is small). Add one for the next breaking change after 0.3.0 to dogfood the igniter upgrade pattern.
Goal
Replace the current per-fragment extensions (
Instance.Extension,Party.Extension,Place.Extension) with a singleDiffo.Provider.Extensionused by all three base fragments.New DSL shape
All provider resources declare a single top-level
provider dosection. The available entities inside it depend on which base fragment is in use, enforced by verifiers.Instance resource:
Party or Place resource:
Key design decisions
party/partiesandplace/placesdeclare direct edges (create a PartyRef/PlaceRef node).party_ref/party_refsandplace_ref/place_refsdeclare reference relationships (no direct edge — replacesreference: trueoption). The intent is explicit in the keyword rather than an option.behaviour domoves insideprovider dorather than being a peer section.rolestays as the keyword for Party/Place resources declaring their participation in instances and other parties/places.BaseInstance,BaseParty,BasePlace) reference the singleDiffo.Provider.Extension.What unifies
Diffo.Provider.Extension.Infointrospection moduleDSL-Diffo.Provider.Extension.md)verify_roles.excurrently duplicated across instance/party/place extension verifier directories becomes one setmix.exsspark aliases,.formatter.exsspark_locals_without_parens, and igniter installer all reference a single extensionBreaking change
This is a 0.3.0 breaking change. Migration is straightforward:
structure do ... end+behaviour do ... end→provider do ... endinstances do role ... end/parties do role ... end→provider do role ... endparty :x, M, reference: true→party_ref :x, MNo igniter upgrade task for 0.3.0 (consumer base is small). Add one for the next breaking change after 0.3.0 to dogfood the igniter upgrade pattern.