[BREAKING] update config parsing to propagate types errors#682
Merged
Conversation
gbin
approved these changes
Jan 20, 2026
Collaborator
Author
|
@gbin should we treat it as a breaking change? If yes, I would mark a [BREAKING] in the title |
Collaborator
|
Nice way more user friendly when you screw up ... Please preemptively add the breaking change notice in the wiki in the release note for the unreleased 0.13 version so we don't forget thanks! |
Collaborator
Author
Wiki updated, migration guide included in the RP description. |
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.
Summary
This PR introduces a breaking change to config parsing throughout the Copper codebase. The core change is modifying ComponentConfig::get() to return Result<Option, ConfigError> instead of Option, enabling type errors to propagate rather than being silently
ignored.
Details
Core Changes (
core/cu29_runtime/src/config.rs)ComponentConfig::get<T>()signature fromOption<T>toResult<Option<T>, ConfigError>TryFrom<&Value>implementations forbool,integers,f64, andStringwith proper type-mismatch errorsserialize_ron()anddeserialize_ron()to returnCuResultinstead of panickingrender()methods to propagate write errors instead of unwrappingAdditional Improvements
cu29_log_runtimeandcu29_unifiedlogMigration Guide
ComponentConfig::get() Signature Change
Migration Pattern
Related Changes
Node::get_param<T>()- same signature changeCuConfig::serialize_ron()- now returnsCuResult<String>instead of StringCuConfig::deserialize_ron()- now returnsCuResult<Self>instead of panicking