You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm still working on #83, but it's occurred to me that, whilst having serde support for simple config and data files is ideal, I'm actually using kdl to write more complex configuration files with logic that means things like the order of children is sometimes important. For that, it's likely easiest for me just to work my way through the KDL AST, but the reason I've been using knuffel / knus in the past is because I think it's really valuable to have a schema that's self-documenting in code like that. If you want to know which KDL is legal for a configuration file, a couple of lightly annotated structs tell you everything you need to know!
Now, I've since realized that there is a KDL schema language (which seems perfect for this — run a validate_schema function, get nice user errors, I get to have my single-source-of-truth in the schema file, and then I can use the AST directly and not worry about doing any "syntax" validation for my KDL file format), but I can't currently find any tools that actually check a KDL file against a schema in this crate?
It's very possible I'm just missing something, but if not, this is another thing I'd love to add, and I think it would address ¾-ths of whats needed for #76
The text was updated successfully, but these errors were encountered:
I'm actually working on the new schema format, and I plan on writing a schema verifier into this repo once that's done (and including it with kdl-lsp). You can see the WIP schema work over at https://github.com/kdl-org/kdl/pull/486/files
@zkat That's super exciting! Okay, I'll leave you to it and am happy to provide feedback if you're ever wanting anyone to kick the tires! In the meantime I'll focus on serde a la quick-xml!
I'm still working on #83, but it's occurred to me that, whilst having
serde
support for simple config and data files is ideal, I'm actually usingkdl
to write more complex configuration files with logic that means things like the order of children is sometimes important. For that, it's likely easiest for me just to work my way through the KDL AST, but the reason I've been usingknuffel
/knus
in the past is because I think it's really valuable to have aschema
that's self-documenting in code like that. If you want to know which KDL is legal for a configuration file, a couple of lightly annotated structs tell you everything you need to know!Now, I've since realized that there is a KDL schema language (which seems perfect for this — run a
validate_schema
function, get nice user errors, I get to have my single-source-of-truth in the schema file, and then I can use the AST directly and not worry about doing any "syntax" validation for my KDL file format), but I can't currently find any tools that actually check a KDL file against a schema in this crate?It's very possible I'm just missing something, but if not, this is another thing I'd love to add, and I think it would address ¾-ths of whats needed for #76
The text was updated successfully, but these errors were encountered: