[FEAT] Implement modular configuration#328
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a modular configuration system in Copper‑rs to allow splitting large configurations into reusable components by adding support for file includes and parameter substitution. Key changes include new RON templates for motor tasks, updated configuration deserialization and merging logic in the runtime, and enhanced documentation and compile-fail tests reflecting the new behavior.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| examples/modular_config_example/*.ron & README.md | New example files and documentation demonstrating modular configuration usage |
| doc/modular_config.md | Detailed documentation on including configuration files and parameter substitution |
| core/cu29_runtime/src/config.rs | Updated error handling, parameter substitution, and include processing/merging logic |
| core/cu29_derive/tests/compile_fail/*.stderr & src/lib.rs | Adjusted error messages and macro usage reflecting the new config API |
| README.md | Updated project overview to include modular configuration details |
Comments suppressed due to low confidence (1)
core/cu29_runtime/src/config.rs:1304
- The merging logic for connections similarly skips adding a connection if one with the same source and destination already exists, which prevents later includes from overriding earlier ones as documented. Consider implementing an update mechanism for connections to ensure later includes take precedence.
if !cnx.iter().any(|c| c.src == included_c.src && c.dst == included_c.dst)
gbin
approved these changes
May 16, 2025
gbin
left a comment
Collaborator
There was a problem hiding this comment.
I believe this is good to go, let's merge it and I'll resume the missions on top of this.
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.
Overview
This PR implements a modular configuration system for Copper-rs that allows splitting large configurations into reusable components. The implementation enables parameter substitution, file inclusion, and hierarchicalcomposition - addressing a key roadmap item.
Key Features
- Hierarchical inclusion with circular dependency detection(removed to support template-based configuration)Example Implementation
The
modular_config_exampledirectory provides a clear demonstration of the feature in action, showing how to: