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

Rethink #376

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Rethink #376

wants to merge 18 commits into from

Conversation

matthiasbeyer
Copy link
Member

@matthiasbeyer matthiasbeyer commented Sep 17, 2022

Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
This patch adds a type for a String buffer as a source for the
configuration as well as format parser interfaces.

Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
This patch changes the Accessor type to be a helper over a list of
AccessType objects.

Signed-off-by: Matthias Beyer <[email protected]>
This patch also removes the associated error type from the ConfigSource
trait, as we figured out that this can be simply a SourceError.

Signed-off-by: Matthias Beyer <[email protected]>
This patch removes the async loading.
The async loading makes everything awefully complicated and in fact it
should rather be solved on the user side of things, not within this
crate.

Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
@FlixCoder
Copy link

Do you think it would be possible to generate sample configs including doc comments with the new approach? Or would it still need a separate macro to get the doc comments?

I am thinking about writing a macro for generating sample configs with documentation of the fields.

@matthiasbeyer
Copy link
Member Author

I could imagine that it would be possible.

@milesj
Copy link

milesj commented Jan 1, 2023

Is there any progress on this? I'm looking to move away from figment, and this crate is probably the best choice, but based on all the refactor talk, I'm hesitant to move to it.

@matthiasbeyer
Copy link
Member Author

Is there any progress on this?

There's progress here: https://github.com/matthiasbeyer/config-rs-ng - still slow, but at least there's progress!

I'm looking to move away from figment, and this crate is probably the best choice, but based on all the refactor talk, I'm hesitant to move to it.

The current config-rs version is still usable 😆 - If we decide to move to the rewritten version, there will be a grace period and (if possible) compatible interfaces to make the move less complicated!

@milesj
Copy link

milesj commented Jan 2, 2023

Thanks for the update, I'll keep an eye on it 👍

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.

3 participants