mirror of
https://github.com/fluencelabs/marine-rs-sdk-test
synced 2024-12-04 23:30:18 +00:00
allow using of deprecated fce_test
This commit is contained in:
parent
dea1e2182a
commit
859da3627b
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "marine-test-macro"
|
||||
version = "0.1.5" # remember to update html_root_url
|
||||
version = "0.1.6" # remember to update html_root_url
|
||||
edition = "2018"
|
||||
description = "Definition of the `#[marine_test]` macro"
|
||||
repository = "https://github.com/fluencelabs/rust-sdk/crates/macro-test"
|
||||
|
@ -55,3 +55,20 @@ pub fn marine_test(attrs: TokenStream, input: TokenStream) -> TokenStream {
|
||||
Err(e) => proc_macro_error::abort!(attrs_span, format!("{}", e)),
|
||||
}
|
||||
}
|
||||
|
||||
// deprecated macro for backwards compatibility
|
||||
#[deprecated(since = "0.6.2", note = "please use the #[marine] macro instead")]
|
||||
#[proc_macro_error]
|
||||
#[proc_macro_attribute]
|
||||
pub fn fce_test(attrs: TokenStream, input: TokenStream) -> TokenStream {
|
||||
let attrs: proc_macro2::TokenStream = attrs.into();
|
||||
let attrs_span = attrs.span();
|
||||
// here it obtains a path to the current file where macro is applied
|
||||
let mut file_path = proc_macro::Span::call_site().source_file().path();
|
||||
let _ = file_path.pop();
|
||||
|
||||
match marine_test_impl(attrs, input.into(), file_path) {
|
||||
Ok(stream) => stream.into(),
|
||||
Err(e) => proc_macro_error::abort!(attrs_span, format!("{}", e)),
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "fluence-test"
|
||||
version = "0.1.6" # remember to update html_root_url
|
||||
version = "0.1.7" # remember to update html_root_url
|
||||
description = "Fluence backend SDK for testing"
|
||||
documentation = "https://docs.rs/fluence/"
|
||||
repository = "https://github.com/fluencelabs/rust-sdk"
|
||||
@ -19,7 +19,7 @@ path = "src/lib.rs"
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
marine-test-macro = { path = "../crates/marine-test-macro", version = "0.1.5" }
|
||||
marine-test-macro = { path = "../crates/marine-test-macro", version = "0.1.6" }
|
||||
fluence-app-service = { version = "0.7.0", features = ["raw-module-api"] }
|
||||
|
||||
serde = { version = "1.0.118", features = ["derive"] }
|
||||
|
Loading…
Reference in New Issue
Block a user