Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes aim to provide an
include
keyword in thekdl
config files that provides support for spreading configuration over multiple files as discussed in #3376.What I did:
include
keyword to thekdl
configinclude
keyword parses the included file(s) just like themain.kdl
file gets parsedinclude
keyword can take either a single file path as a string as an argument like this:include
keyword may take absolute or relative paths and does expand shell variables usingshellexpand
What I didn't implement(maybe yet):
include
can only be written once per file similar to all the other config optionsto_kdl
method which isn't implemented forinclude
although I feel like it would be quite difficultI hope this summarizes everything for you guys. Tell me if I can improve on something since I am still learning rust and not all too well versed in the language. I was also not too sure where to put my functions so tell me if they should be moved. Also tell me if I should squash my 3 commits no problem. Also feel free to tell me if this shouldn't be merged to main, wasn't quite sure now.