-
Notifications
You must be signed in to change notification settings - Fork 858
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
Idea: Inline includes? #36
Comments
Then you have a runtime requirement. Bad. If you want includes, use some specially-named key that has meaning for your application, and sort it out yourself.
|
Agreed all around. |
I am definitely not proposing to add this to TOML, but just for a better format in case someone wants to do a little dialect: In TOML the unquoted keys can only be alphanumeric or %include "foo.toml"
%include-dir "conf.d" ... which could be described more concretely as: preprocessor = %x25 preprocessor-key ws string
preprocessor-key = "include" / "include-dir" I am calling it "preprocessor" as integrating this stuff into the expression tree is not something I want to look at at all, although for the top level you can just go with And this clearly lacks the flexibility to just include a part of some other file -- you should probably hack up a variant of JSONPath for that and handle it in the application after all. (Yeah, nothing stops you from putting that in the percent-PP-statement too, but doing so would bring about even more cursed changes as you begin to put it in the core syntax.) |
What happened to this feature, why was closed? |
See the closing note: #36 (comment) |
In Python-land, it's not uncommon to include subsections of an INI file from another INI file. (Especially in Paste-style INI files.)
So I could have
And in my unit testing environment, I'd override just one key...
TOML proposal
As for how this would look like in TOML if we wanted to support it, perhaps some variation of...
Or perhaps...
Quite possibly out of scope for TOML, but an interesting thought experiment.
The text was updated successfully, but these errors were encountered: