Skip to content
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

Moving config parsing to serde #272

Open
ChristopherJMiller opened this issue Sep 14, 2022 · 3 comments
Open

Moving config parsing to serde #272

ChristopherJMiller opened this issue Sep 14, 2022 · 3 comments
Milestone

Comments

@ChristopherJMiller
Copy link
Contributor

ChristopherJMiller commented Sep 14, 2022

I believe a lot of complexity could be removed by swapping config parsing from a manually process with yaml-rust to object deserialization with serde with it's derive feature and a supporting yaml deserializer.

The Intermediate types could be removed as the deserializer understands optional parameters. To handle defaults, the attributes on config can be made private and getters can be implemented that access self and unwrap to a default if they were not set. The mode "serial" or "parallel" can be mapped properly via the derive attribute macros on enums.

This could also ease the work involved with #265

Thoughts?

@artem-zinnatullin
Copy link
Contributor

Sounds good, I'd like to get rid of intermediate_config stuff

pub struct IntermediateConfig {

Just make sure to keep config validation :)

@artem-zinnatullin
Copy link
Contributor

Heads up: @ChristopherJMiller pls make sure you're on updated 3.x branch when you start working on this, I've merged quite a few infrastructure updates in last few days 😬

@ChristopherJMiller
Copy link
Contributor Author

PR is up at #282 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants