Skip to content

Conversation

@bolshakov
Copy link
Owner

Remove the intermediate Settings representation and Option type (Some/None)
abstraction in favor of using Domain::Config directly with the existing
Undefined sentinel pattern.

Previously, defaults were injected lazily at light creation time. Settings
tracked whether each value was explicitly configured (Some) or not (None),
and ConfigurationPipeline resolved None values to defaults at the end.

Now, configuration starts with DefaultConfig containing all default values,
and user-provided values extend/override them immediately via Config#with.
This "defaults-first" approach is simpler and makes the effective
configuration visible earlier in the pipeline.

Old flow:
User DSL → Settings (Option-wrapped) → ConfigurationPipeline → Config
(defaults injected here)

New flow:
DefaultConfig → extend with user values → Config (validated)
(starts with defaults)

This reduces indirection and makes the configuration flow clearer.
ConfigurationDsl handles interpreting user-friendly values (symbols,
single error classes) into canonical forms before merging.

Remove the intermediate Settings representation and Option type (Some/None)
abstraction in favor of using Domain::Config directly with the existing
Undefined sentinel pattern.

Previously, defaults were injected lazily at light creation time. Settings
tracked whether each value was explicitly configured (Some) or not (None),
and ConfigurationPipeline resolved None values to defaults at the end.

Now, configuration starts with DefaultConfig containing all default values,
and user-provided values extend/override them immediately via Config#with.
This "defaults-first" approach is simpler and makes the effective
configuration visible earlier in the pipeline.

Old flow:
  User DSL → Settings (Option-wrapped) → ConfigurationPipeline → Config
  (defaults injected here)

New flow:
  DefaultConfig → extend with user values → Config (validated)
  (starts with defaults)

This reduces indirection and makes the configuration flow clearer.
ConfigurationDsl handles interpreting user-friendly values (symbols,
single error classes) into canonical forms before merging.
@bolshakov bolshakov merged commit 446bf1b into develop Jan 12, 2026
31 checks passed
@bolshakov bolshakov deleted the feature/remove-settings branch January 12, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants