Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
Add a function to programmatically modify the configuration
Merged did:key:z6MkgFWv...1Lu7 opened 1 year ago

Use new function to add commands for modifying configuration values.

Note that the changes will affect the configuration file, but not the running instances. For changes to be reflected in the running instances the node would need to be restarted.

did:key:z6MkgFWv...1Lu7 opened with revision af2103d6 on base 54551b11 +157 -7 1 year ago

Use new function to add commands for modifying configuration values.

Note that the changes will affect the configuration file, but not the running instances. For changes to be reflected in the running instances the node would need to be restarted.

did:key:z6MkgFWv...1Lu7 pushed revision 2 0cf08119 on base 54551b11 +155 -7 1 year ago

Add a function to programmatically modify the configuration

Note that the changes will affect the configuration file, but not the running instances. For changes to be reflected in the running instances the node would need to be restarted. Add commands for modifying configuration values.

did:key:z6MkgFWv...1Lu7 pushed revision 3 056c638e on base 54551b11 +245 -6 1 year ago

Add programmatic config changes

Ensure the config changes don’t overwrite existing additional values.

did:key:z6MkgFWv...1Lu7 pushed revision 4 e463769d on base 54551b11 +278 -7 1 year ago

Add a function to programmatically modify the configuration

Note that the changes will affect the configuration file, but not the running instances. For changes to be reflected in the running instances the node would need to be restarted.

did:key:z6MkgFWv...1Lu7 pushed revision 5 2b3d51da on base 54551b11 +285 -7 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 6 2aa69d82 on base 54551b11 +467 -25 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 7 7e6b4f40 on base 54551b11 +436 -25 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 8 19ed0c70 on base 54551b11 +407 -31 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 9 a136a0ea on base 54551b11 +404 -30 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 10 e15a2b7c on base 54551b11 +396 -30 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 11 74cc0684 on base 54551b11 +396 -30 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 12 0bcf3c1a on base 54551b11 +400 -30 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 13 3c328a7b on base 54551b11 +378 -30 1 year ago

Use .iter() instead of .into_iter() to avoid cloning.

Remove Action design and offer methods directly.

Move Validation to write method of TempConfig.

Use functions directly in cli.

fintohaps pushed revision 14 1761e43c on base 54551b11 +493 -128 1 year ago

WIP: code review

  • Moved config related code into a config module so that it’s easier to work with
  • Created a ModifyError enum for handling the modification errors
  • Some wording changes on the error messages
  • There was a bug where rad config add of a non-existent path would not create an array. This was fixed and a test case was added
  • Changed iter to return the trait object instead
  • Changed last to return a reference
  • Use split_last to construct the ConfigPath::parent
  • Left a TODO since the API is technically unsafe since someone can construct a ConfigValue::Float with NaN if they construct it directly
did:key:z6MkgFWv...1Lu7 pushed revision 15 97fc3acc on base 54551b11 +497 -128 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 16 48a12786 on base 54551b11 +499 -128 1 year ago
did:key:z6MkgFWv...1Lu7 pushed revision 17 f7b19153 on base 54551b11 +499 -128 1 year ago
fintohaps pushed revision 18 a18be31b on base 54551b11 +488 -131 1 year ago

REVIEW

  • Use term::args::string to parse key/value inputs
  • No need to print anything when deleting a key
  • Print null value
  • Remove last and parent methods in favour of split_last method
  • General cleanup and formatting of docs
  • Leave FIXME for corner case of ConfigPath that may want to refer to a key with a . in it
did:key:z6MksFqX...wzpT pushed revision 19 82adfa70 on base a838c3ea +520 -128 1 year ago

A few small improvements and changes in the API.

delete -> unset add -> push

did:key:z6MksFqX...wzpT pushed revision 20 3e77a3df on base a838c3ea +519 -128 1 year ago

Fix trailing line.

did:key:z6MksFqX...wzpT merged revision 3e77a3df at 0c9a7419 1 year ago