-
-
Notifications
You must be signed in to change notification settings - Fork 43
Conversation
90f44a6
to
014377b
Compare
014377b
to
c11dcfd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to avoid unwrap
(see comment), otherwise will work for now
FYI I've added a commit ( |
Randomly passing by and looking at that change, I should probably try to improve |
@Kixunil we need multiple binaries support and sectioned configuration (that allows storing multiple daemon configs under the same file) |
Multiple binaries are already supported, do you mean some specific feature related to multiple binaries? |
Yes, I meant multiple sections related to multiple binaries |
What's the advantage of this approach over having the files separately? I see at least one disadvantage: will be harder to atomate in deployments like my Deb repository. |
Which files? Config or binaries? |
Having a single config file for all binaries vs having a separate config file for each binary. Note that sharing common options in a single config and different options in a different config is already possible. (A clean approach IMO. Similar to include statement but without the complicated logic of include statements.) |
From a maintainability perspective single config covering all binaries is more efficient. In fact very few options are binary-specific, most of them are shared, so it will be strange to have a six config files most of which will have a single or two lines of configuraiton |
Yeah, this seems to be true for manual maintenance. Automated is easier with multiple files as changes to one could only affect one binary and restarting all binaries may be excessive. Multiple files avoid this problem as well as writing complicated logic to detect such situations. Ideally we would support both. I think it can be done by each binary parsing a config and also a section of appropriate name, ignoring the rest. It would also make sure for the section to override global settings. This way this will be possible: foo = 42
[binary1]
# overrides foo above for this binary
foo = 47
[binary2]
bar = "satoshi"
What do you think? |
I think this will work. But can we have secion names matching binary names? |
I think at least first version will make section names matching binary names mandatory. :) |
I agree that it should not |
closes RGB-WG/rgb-sdk#19 and #102
the solution is not very elegant, but since @dr-orlovsky said:
I tried to avoid changing the existing structure as much as possible