From 4f75d3d26e52052e9c31ed6b1a60908aa9d06706 Mon Sep 17 00:00:00 2001 From: vms Date: Mon, 10 May 2021 23:26:37 +0300 Subject: [PATCH] add Debug for SDKAst types --- crates/marine-macro-impl/Cargo.toml | 2 +- .../marine-macro-impl/src/export_ast_types.rs | 18 +++++++++--------- crates/marine-macro/Cargo.toml | 2 +- fluence-test/src/lib.rs | 2 ++ fluence/Cargo.toml | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/crates/marine-macro-impl/Cargo.toml b/crates/marine-macro-impl/Cargo.toml index e1e3693..9c95cb2 100644 --- a/crates/marine-macro-impl/Cargo.toml +++ b/crates/marine-macro-impl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marine-macro-impl" -version = "0.6.2" # remember to update html_root_url +version = "0.6.3" # remember to update html_root_url edition = "2018" description = "Implementation of the `#[marine]` macro" documentation = "https://docs.rs/fluence/marine-macro" diff --git a/crates/marine-macro-impl/src/export_ast_types.rs b/crates/marine-macro-impl/src/export_ast_types.rs index b164899..ff8bb83 100644 --- a/crates/marine-macro-impl/src/export_ast_types.rs +++ b/crates/marine-macro-impl/src/export_ast_types.rs @@ -19,26 +19,26 @@ use crate::parsed_type::ParsedType; use serde::Serialize; use serde::Deserialize; -#[derive(Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct FnArgument { pub name: String, pub ty: ParsedType, } -#[derive(Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct FnSignature { pub name: String, pub arguments: Vec, pub output_types: Vec, } -#[derive(Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct RecordType { pub name: String, pub fields: RecordFields, } -#[derive(Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub enum RecordFields { Named(Vec), // named and unnamed variants have the same inner field types because of it's easy to handle it, @@ -47,33 +47,33 @@ pub enum RecordFields { Unit, } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RecordField { // fields of tuple structs haven't got name pub name: Option, pub ty: ParsedType, } -#[derive(Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct ExternFnType { pub link_name: Option, // only imports are possible here pub signature: FnSignature, } -#[derive(Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct ExternModType { pub namespace: String, // only imports are possible here pub imports: Vec, } -#[derive(Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct FnType { pub signature: FnSignature, } -#[derive(Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] #[serde(tag = "ast_type")] pub enum SDKAst { Function(FnType), diff --git a/crates/marine-macro/Cargo.toml b/crates/marine-macro/Cargo.toml index 843f1c0..8464da0 100644 --- a/crates/marine-macro/Cargo.toml +++ b/crates/marine-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marine-macro" -version = "0.6.2" # remember to update html_root_url +version = "0.6.3" # remember to update html_root_url edition = "2018" description = "Definition of the `#[marine]` macro" documentation = "https://docs.rs/fluence/marine-macro" diff --git a/fluence-test/src/lib.rs b/fluence-test/src/lib.rs index c35db7e..9d15eb4 100644 --- a/fluence-test/src/lib.rs +++ b/fluence-test/src/lib.rs @@ -27,6 +27,8 @@ #![warn(rust_2018_idioms)] pub use marine_test_macro::marine_test; +pub use marine_test_macro::fce_test; + pub use fluence_app_service::CallParameters; pub use fluence_app_service::SecurityTetraplet; diff --git a/fluence/Cargo.toml b/fluence/Cargo.toml index 9ae8217..7d2283a 100644 --- a/fluence/Cargo.toml +++ b/fluence/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fluence" -version = "0.6.3" # remember to update html_root_url +version = "0.6.4" # remember to update html_root_url description = "Fluence backend SDK for developing backend applications for the Fluence network" documentation = "https://docs.rs/fluence/" repository = "https://github.com/fluencelabs/rust-sdk"