-
Notifications
You must be signed in to change notification settings - Fork 14
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
Toml sections? #40
Comments
While not impossible, the biggest issue with such sections would be inconsistency with arguments. I also suspect it'd make the parser much more complex. It's already "possible" to do it by specifying your own struct in type, which impls While certainly nice to have, I kinda fail to see much value in it TBH. Especially how they implemented it in LND (not Toml, but similarly looking), where it doesn't help making the keys shorter (you still have to write I'm open to being convinced by some very good reason. It obviously must be such a good reason that I'd be willing to pause my work on improving Bitcoin privacy to do it... I'm also wiling to accept a PR solving it by introducing |
Well, with the nodes we do (bp, lnp, rgb) we have multiple daemons + cli tools per repo (i.e. multiple binaries), and need to configure each of them. Creating a special config file for each one looks strange, so my idea was to have a section per binary in the same config file... This is related to #41 (comment) basically |
Hmm, this is genuinely interesting. Will need to think about it more. Note that I personally found splitting stuff between files easier to manage. With |
Ok, how I can manage multiple build scripts etc for multiple config files and multiple binaries in the same crate? |
Unfortunately, you currently can't because the output is written into a file with fixed name, so one would overwrite the other. Is it OK, if I address this issue by the end of weekend? Also, it occurred to me that being able to include another config specification might be useful if you have multiple binaries with common options. Would it help you? |
End of week will work! And yes, multiple binaries in my case do share the same options |
Sorry for it taking me a bit longer. Unfortunately, I'm more busy than expected lately, so I at least implemented multiple-binary support (thankfully it had more code prepared than what I remembered. :)). The new released versions should unblock you now. I assume include feature is not that critical and I will need to postpone it a bit. I hope duplication is not that huge issue yet. (You could hack it by concatenating files in build script if you need it really bad.) |
Very good, thank you! |
Sorry if I missed something, but looking in the docs I have not found possibility to use multiple configuration sections, like
The text was updated successfully, but these errors were encountered: