Skip to main content

Module registry

Module registry 

Source
Expand description

MutationRegistry: Central registry for MutationSpec → Mutation conversion

The Registry pattern distributes the conversion logic that was previously concentrated in BlueprintExecutor::convert_and_apply() (2,400+ lines) into separate Converter implementations.

§Architecture

MutationSpec
   │
   ▼ registry.convert(spec)
MutationRegistry
   ├─ converters: HashMap<kind, Box<dyn MutationConverter>>
   │
   ▼ find converter by spec.kind_name()
MutationConverter (trait)
   │
   ▼ convert(spec) → Box<dyn Mutation>
Mutation
   │
   ▼ apply(file) → changes

Modules§

converters
Individual MutationConverter implementations

Structs§

ApplyResult
Result of applying a mutation
MutationRegistry
Central registry for MutationSpec → Mutation conversion
ResolvedMutation
A mutation resolved with its target file information.

Enums§

ConvertError
Error type for conversion operations

Traits§

MutationConverter
Trait for converting MutationSpec to Mutation and applying it

Functions§

opt_resolve_file_path_from_symbol
Resolve an optional SymbolPath to optional WorkspaceFilePath via Registry.
resolve_file_path_from_symbol
Resolve a SymbolPath to WorkspaceFilePath via Registry.