-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Putting names in toml hash table headings #45
Comments
Hey, I really like the idea! I'm not happy with the current, super verbose TOML config (I'm mainly using YAML for my own stuff, as it's much shorter). Implementing the change should be possible. To give you a short overview over the code that handles the configuration file: All the config reading & parsing is done in The important function that is used by the rest of the code to get the configuration itself is All the actual parsing is done by So I think the easiest way to do this would be the following:
This is just a guess without having tried it out. There might be a more elegant way. If you know another way, let me know, I'm always happy to discover better approaches. Regardless of the approach in the end, I think it's a good idea to encapsulate config parsing inside Let me know if you're interested in giving the implementation a shot. Otherwise, I may give it a try (I really like your new format), but I'm quite busy at the moment. In any case, thank you for suggestion! Have a nice day. :) |
Okay. Very helpful, thorough information. Thank you for the feedback. I suffer from being quite busy at the moment too. However, as soon as I find some spare time I will cut ground on this, but it may be that you or another beat me to it. I think it is possible to support both without any interruption to users based on your guidance. As an aside, the forge implementation is awesome, too. |
I wonder if you see any merit it putting names into using a slightly simplified (I think) configuration. This uses quite a few arrays as is that contain names for things that are already atomic. For example, directory names and remote names already require uniqueness.
In my view, this would make a slightly more terse and readable configuration in any format. For example, this config.toml:
would become:
That would have the byproduct of forcing names not be duplicated in these cases, and it feels a bit more nice to me.
Of course, you have put together a wonderful tool. Thank you.
Also, I think this could be further simplified using some very sensible heuristics to get the same configuration from:
The text was updated successfully, but these errors were encountered: