mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 19:57:56 +00:00
codegen: Add codegen error (#841)
* codegen: Add codegen error Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Use codegen error instead of aborts Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Remove `proc-macro-error` dependency Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * macro/subxt: Transform codegen error into compile_error! Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Pretty printing for `CodegenError` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update cargo.lock Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * tests: Adjust testing for codegen error Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Fix documentation example Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Export `CodegenError` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Use collect::<Result<_>, _>() Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Adjust comment regarding error printing Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Improve error messages Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -66,6 +66,7 @@ fn generate_runtime_interface(crate_path: CratePath, should_gen_docs: bool) -> S
|
||||
crate_path,
|
||||
should_gen_docs,
|
||||
)
|
||||
.expect("API generation must be valid")
|
||||
.to_string()
|
||||
}
|
||||
|
||||
@@ -155,6 +156,7 @@ fn check_root_attrs_preserved() {
|
||||
CratePath::default(),
|
||||
true,
|
||||
)
|
||||
.expect("API generation must be valid")
|
||||
.to_string();
|
||||
|
||||
let doc_str_loc = generated_code
|
||||
|
||||
Reference in New Issue
Block a user