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: master
Choose a base branch
from
Draft

Rethink #376

wants to merge 18 commits into from

Conversation

matthiasbeyer
Copy link
Collaborator

@matthiasbeyer matthiasbeyer commented Sep 17, 2022

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
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 <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This patch changes the Accessor type to be a helper over a list of
AccessType objects.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
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 <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
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 <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
… the crate

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
@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
Collaborator 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
Collaborator 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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants