-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a multi-file based target description mechanism #2226
base: master
Are you sure you want to change the base?
Conversation
35c1c71
to
41533c3
Compare
41533c3
to
43849db
Compare
I am not sure what exactly we want to do with the new format. I would like it actually if maybe we could have the extracted flash algo binary in a separate file. |
521f92f
to
5637db8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a solution looking for a problem. So far the only case where I personally could have used something like this was the ESP32 support, where two devices are extremely close, except for suble differences. But in the end we ended up not adding two different variants there.
I'm not sure how much value there is in just splitting existing descriptions up into pieces. If a family grows too big, it can already be broken up into separate descriptions. Is there enough reuse potential to justify complicating things?
]; | ||
|
||
let merged = ChipFamily::merge(values).unwrap(); | ||
insta::assert_yaml_snapshot!(merged); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have to be piped through insta? I wouldn't think comparing two 4-line yaml blobs really wants a solution where the expectation is in a different folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it because it makes spotting differences really nice and manageable. It is a dev dependency, so it should not matter much.
We have many target files that we have patched manually. And it happened many times that someone regenerated from a pack and we had a regression due to that. |
22e4184
to
5656507
Compare
5656507
to
76aac45
Compare
@@ -253,10 +255,13 @@ async fn cmd_arm(out_dir: Option<PathBuf>, chip_family: Option<String>, list: bo | |||
let mut generated_files = Vec::with_capacity(families.len()); | |||
|
|||
for family in &families { | |||
let path = out_dir.join(family.name.clone().replace(' ', "_") + ".yaml"); | |||
let file = std::fs::File::create(&path) | |||
let path = out_dir.join(family.name.clone().replace(' ', "_")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, do we need to clone here?
No description provided.