iroha icon indicating copy to clipboard operation
iroha copied to clipboard

[feature] #2587: Split `Configurable` into two traits

Open ilchu opened this issue 2 years ago • 1 comments

Description of the Change

  • Refactor of the whole iroha_config_derive crate to use the same structures throughout
  • Separate traits for Configurable / Configuration, LoadFromDisk and LoadFromEnv
  • Proxy config generation, but for now the derive is done on the parent struct instead of the proxy. This keeps the change minimal
  • iroha_config_base::derive::Error refactor
  • Fixed doc tests in the config crate (and some older ones in filter)
  • Default derives and the config entrypoint still same as before, will be dealt with in future PRs

Issue

Closes #2587.

Benefits

Work towards the #2585 epic.

Possible Drawbacks

Some TODOs sprinkled around in the commit signify stumble points, questionable designs or plans for future work.

ilchu avatar Aug 09 '22 15:08 ilchu

Codecov Report

Merging #2602 (c5a21bd) into iroha2-dev (a16d9c3) will decrease coverage by 1.53%. The diff coverage is 69.02%.

:exclamation: Current head c5a21bd differs from pull request most recent head 9e85ca9. Consider uploading reports for the commit 9e85ca9 to get more accurate results

@@              Coverage Diff               @@
##           iroha2-dev    #2602      +/-   ##
==============================================
- Coverage       67.61%   66.07%   -1.54%     
==============================================
  Files             140      160      +20     
  Lines           26173    28293    +2120     
==============================================
+ Hits            17696    18694     +998     
- Misses           8477     9599    +1122     
Impacted Files Coverage Δ
cli/derive/src/lib.rs 74.72% <ø> (ø)
cli/src/torii/mod.rs 28.88% <ø> (ø)
cli/src/torii/routing.rs 69.75% <0.00%> (-3.04%) :arrow_down:
client/src/client.rs 43.36% <0.00%> (-2.96%) :arrow_down:
client_cli/src/main.rs 0.26% <ø> (ø)
config/base/src/runtime_upgrades.rs 35.63% <ø> (ø)
core/src/block.rs 70.00% <ø> (ø)
core/src/queue.rs 95.67% <ø> (-0.08%) :arrow_down:
core/src/smartcontracts/isi/asset.rs 54.82% <ø> (ø)
core/src/smartcontracts/wasm.rs 95.39% <ø> (+0.12%) :arrow_up:
... and 158 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Aug 09 '22 15:08 codecov[bot]