86 transformers persisters verifiers#92
Merged
Merged
Conversation
relate_instance functions now pass %Instance{id: result.id} to Provider
calls rather than converting the domain-specific struct via Map.from_struct.
This respects Ash's static relationship contracts (Feature.instance_id
belongs to Diffo.Provider.Instance, not Shelf or Card).
build_after/2 ends with Ash.load/2 to load relationships back onto the
correct domain struct, replacing the per-domain reload that was masking
the struct type loss. build_after/4 removed entirely.
Also replaces Map.put with struct update syntax and drops dead-looking
aliases in favour of fully qualified module names in DSL options.
Five Spark.Dsl.Transformer modules bake structural DSL data into zero-cost module functions (__diffo_specification__/0, __diffo_characteristics__/0, __diffo_features__/0, __diffo_party_declarations__/0) and a behavioural transformer (TransformBuildActions) composes them into __diffo_build_before__/1 and __diffo_build_after__/2. 2-arity variants added to Specification, Feature, Characteristic, and Party helpers accept pre-baked declaration lists instead of doing runtime Info introspection, so the generated build hooks pay no Info lookup cost at runtime. Transformer ordering is enforced via after?/1 so TransformBuildActions always runs after all four structural transformers.
…s, verifiers, and Info lookups Restructures the extension into structure do (specification, characteristics, features, parties) and behaviour do (actions), bakes all DSL data at compile time via persisters, generates build_before/1/build_after/2 and single-item lookup functions (characteristic/1, feature/1, feature_characteristic/2, party/1) via TransformBehaviour, adds uniqueness and cross-reference verifiers for all DSL sections, exposes matching lookups on Diffo.Provider.Instance.Info, and removes superseded 1-arity helpers and old transformer files.
…livebook update Strengthens party verifier to check party_type extends BaseParty via PartyInfo.party?/1, adds instance?/1 to Extension.Info mirroring the same idiom, and rewrites the provider extension livebook to use the structure do / behaviour do DSL with automatic build wiring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.