Skip to content

Commit 9d91c77

Browse files
0x009922DCNick3
andauthored
feat: improve config debug-ability (#4456)
* [refactor]: put new API into `iroha_config_base` Signed-off-by: Dmitry Balashov <[email protected]> * [test]: move tests Signed-off-by: Dmitry Balashov <[email protected]> * [feat]: create foundation for `ReadConfig` derive (wip) Signed-off-by: Dmitry Balashov <[email protected]> * [fix]: parse `default` properly Signed-off-by: Dmitry Balashov <[email protected]> * [feat]: impl shape analysis Signed-off-by: Dmitry Balashov <[email protected]> * [test]: update stderr Signed-off-by: Dmitry Balashov <[email protected]> * [fix]: fix macro, it kind of works! Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: improve errors Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: update `iroha_config` (wip) Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: update user layer, mostly Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: move `iroha_config` onto the new rails Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: lints & chores Signed-off-by: Dmitry Balashov <[email protected]> * [fix]: fix visibility issues in data model Signed-off-by: Dmitry Balashov <[email protected]> * [fix]: after-rebase chores Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: update `iroha_core` Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: update the whole workspace Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: lints Signed-off-by: Dmitry Balashov <[email protected]> * [chore]: fix cfg Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: balance trace logs Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: move high-level validations to CLI layer Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: change `custom` to `env_custom` Signed-off-by: Dmitry Balashov <[email protected]> * [feat]: attach TOML value to report Signed-off-by: Dmitry Balashov <[email protected]> * [feat]: enhance origin attachments Signed-off-by: Dmitry Balashov <[email protected]> * [fix]: client cli... works? Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: rehearse errors Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: chores Signed-off-by: Dmitry Balashov <[email protected]> * [fix]: compiler errors and lints Signed-off-by: Dmitry Balashov <[email protected]> * [test]: fix tests, validate addrs only in `release` Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: internal docs, renamings, lints Signed-off-by: Dmitry Balashov <[email protected]> * [test]: fix private keys in test configs Signed-off-by: Dmitry Balashov <[email protected]> * [fix]: allow self peer id in trusted peers Signed-off-by: Dmitry Balashov <[email protected]> * [test]: update snapshot Signed-off-by: Dmitry Balashov <[email protected]> * Apply suggestions from code review Co-authored-by: ⭐️NINIKA⭐️ <[email protected]> Signed-off-by: 0x009922 <[email protected]> * [feat]: prefix macro error Signed-off-by: Dmitry Balashov <[email protected]> * [docs]: add a note about syntactic match Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: delegate parsing to `syn::punctuated` Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: use mutable reader, split `ReadingDone` Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: lints Signed-off-by: Dmitry Balashov <[email protected]> * [chore]: link false-positive issue rust-lang/rust#44752 (comment) Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: ignore report locations address #4456 (comment) Signed-off-by: Dmitry Balashov <[email protected]> * [fix]: use `ExposedPrivateKey` Signed-off-by: Dmitry Balashov <[email protected]> * [fix]: fix with all-features Signed-off-by: Dmitry Balashov <[email protected]> * [refactor]: chores Signed-off-by: Dmitry Balashov <[email protected]> * [chore]: format Signed-off-by: Dmitry Balashov <[email protected]> * refactor: use stricter `TrustedPeers` struct Signed-off-by: Dmitry Balashov <[email protected]> * chore: remove extra TODO Signed-off-by: Dmitry Balashov <[email protected]> * refactor: remove `env_custom` Signed-off-by: Dmitry Balashov <[email protected]> * chore: remove extra import Signed-off-by: Dmitry Balashov <[email protected]> * revert: return `pub(crate)` vis Signed-off-by: Dmitry Balashov <[email protected]> * chore: dead import Signed-off-by: Dmitry Balashov <[email protected]> * fix: fix path to `iroha_test_config.toml` Signed-off-by: Dmitry Balashov <[email protected]> --------- Signed-off-by: Dmitry Balashov <[email protected]> Signed-off-by: 0x009922 <[email protected]> Co-authored-by: ⭐️NINIKA⭐️ <[email protected]>
1 parent bf789ef commit 9d91c77

File tree

81 files changed

+4916
-3346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+4916
-3346
lines changed

Cargo.lock

Lines changed: 350 additions & 495 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ iroha_data_model_derive = { version = "=2.0.0-pre-rc.21", path = "data_model/der
3030
iroha_client = { version = "=2.0.0-pre-rc.21", path = "client" }
3131
iroha_config = { version = "=2.0.0-pre-rc.21", path = "config" }
3232
iroha_config_base = { version = "=2.0.0-pre-rc.21", path = "config/base" }
33+
iroha_config_base_derive = { version = "=2.0.0-pre-rc.21", path = "config/base/derive" }
3334
iroha_schema_gen = { version = "=2.0.0-pre-rc.21", path = "schema/gen" }
3435
iroha_schema = { version = "=2.0.0-pre-rc.21", path = "schema", default-features = false }
3536
iroha_schema_derive = { version = "=2.0.0-pre-rc.21", path = "schema/derive" }
@@ -96,11 +97,13 @@ spinoff = "0.8.0"
9697

9798
criterion = "0.5.1"
9899
expect-test = "1.5.0"
100+
assertables = "7"
99101

100102
eyre = "0.6.12"
101103
color-eyre = "0.6.3"
102104
thiserror = { version = "1.0.60", default-features = false }
103105
displaydoc = { version = "0.2.4", default-features = false }
106+
error-stack = "0.4.1"
104107

105108
cfg-if = "1.0.0"
106109
derive_more = { version = "0.99.17", default-features = false }

cli/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,25 @@ iroha_genesis = { workspace = true }
5454
iroha_wasm_builder = { workspace = true }
5555

5656
clap = { workspace = true, features = ["derive", "env", "string"] }
57-
color-eyre = { workspace = true }
5857
eyre = { workspace = true }
58+
error-stack = { workspace = true, features = ["eyre"] }
59+
thiserror = { workspace = true }
5960
tracing = { workspace = true }
6061
tokio = { workspace = true, features = ["macros", "signal"] }
6162
once_cell = { workspace = true }
6263
owo-colors = { workspace = true, features = ["supports-colors"] }
6364
supports-color = { workspace = true }
65+
toml = { workspace = true }
6466

6567
thread-local-panic-hook = { version = "0.1.0", optional = true }
6668

6769
[dev-dependencies]
6870
serial_test = "3.1.1"
6971
tempfile = { workspace = true }
70-
toml = { workspace = true }
7172
json5 = { workspace = true }
7273
futures = { workspace = true }
7374
path-absolutize = { workspace = true }
74-
assertables = "7"
75+
assertables = { workspace = true }
7576

7677
[build-dependencies]
7778
iroha_wasm_builder = { workspace = true }

0 commit comments

Comments
 (0)