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

add kdl v2 support #1139

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

add kdl v2 support #1139

wants to merge 1 commit into from

Conversation

zkat
Copy link

@zkat zkat commented Feb 17, 2025

This adds v2 support with fallback to v1 for legacy configs. It might be a bit bumpy at first but I'm hoping it works ok. Probably worth treating as experimental for now.

@zkat zkat force-pushed the main branch 8 times, most recently from f9076ec to 9b3b79b Compare February 17, 2025 22:39
@zkat zkat marked this pull request as draft February 17, 2025 22:48
This adds v2 support with fallback to v1 for legacy configs.
It might be a bit bumpy at first but I'm hoping it works ok.
Probably worth treating as experimental for now.
@YaLTeR
Copy link
Owner

YaLTeR commented Feb 18, 2025

Thanks, looks quite reasonable. If you don't mind, I'll postpone looking at this to after the next release (planned for this weekend).

One thing that I wanted to look into for KDL 2 is to remove/change a few select things in the config by checking or editing the document before passing it on to knuffel. (So that the KDLv1 config remains exactly as it was, but the KDLv2 config can remove some deprecated stuff.) But that's for me to think about and poke around with.

@zkat
Copy link
Author

zkat commented Feb 18, 2025

Yeah! There might still be stuff to fix on the kdl-rs side but I won't be able to properly debug stuff until I get back on my Linux machine later this week. The v2 parsing is definitely not quite passing tests yet and I don't know if it's because I just messed up porting the document over. I know the default config parses fine in v2 though.

Either way I just wanted to put this up to start the conversation and also give you a sense of the impact it might have

@YaLTeR
Copy link
Owner

YaLTeR commented Feb 18, 2025

Wrote up a discussion about things I want to look into changing in KDLv2: #1142

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.

2 participants