From 8bd3d8c47957cf98ccc6ada6e9025bbee5e94778 Mon Sep 17 00:00:00 2001 From: maciektr Date: Fri, 16 Feb 2024 10:05:34 +0100 Subject: [PATCH] Rename cairo-lang-macro-interface to cairo-lang-macro (#1149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit-id:405d4728 --- **Stack**: - #1143 - #1148 - #1100 - #1110 - #1093 - #1091 - #1060 - #1149 ⬅ ⚠️ *Part of a stack created by [spr](https://github.com/ejoffe/spr). Do not merge manually using the UI - doing so may have unexpected results.* --- Cargo.lock | 22 +++++++++---------- Cargo.toml | 2 +- plugins/cairo-lang-macro-attributes/README.md | 2 +- .../cairo-lang-macro-attributes/src/lib.rs | 4 ++-- .../Cargo.toml | 2 +- .../README.md | 2 +- .../src/lib.rs | 0 .../src/stable_abi.rs | 0 scarb/Cargo.toml | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) rename plugins/{cairo-lang-macro-interface => cairo-lang-macro}/Cargo.toml (93%) rename plugins/{cairo-lang-macro-interface => cairo-lang-macro}/README.md (61%) rename plugins/{cairo-lang-macro-interface => cairo-lang-macro}/src/lib.rs (100%) rename plugins/{cairo-lang-macro-interface => cairo-lang-macro}/src/stable_abi.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 1e863cf77..80155b364 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -725,16 +725,7 @@ dependencies = [ ] [[package]] -name = "cairo-lang-macro-attributes" -version = "0.0.1" -dependencies = [ - "camino", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "cairo-lang-macro-interface" +name = "cairo-lang-macro" version = "0.0.1" dependencies = [ "anyhow", @@ -744,6 +735,15 @@ dependencies = [ "serde_json", ] +[[package]] +name = "cairo-lang-macro-attributes" +version = "0.0.1" +dependencies = [ + "camino", + "quote", + "syn 2.0.48", +] + [[package]] name = "cairo-lang-parser" version = "2.5.3" @@ -4470,7 +4470,7 @@ dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", "cairo-lang-formatter", - "cairo-lang-macro-interface", + "cairo-lang-macro", "cairo-lang-semantic", "cairo-lang-sierra", "cairo-lang-sierra-to-casm", diff --git a/Cargo.toml b/Cargo.toml index 281e41458..f0e4f658c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ members = [ "extensions/scarb-cairo-test", "extensions/scarb-snforge-test-collector", "plugins/cairo-lang-macro-attributes", - "plugins/cairo-lang-macro-interface", + "plugins/cairo-lang-macro", "utils/create-output-dir", "utils/scarb-build-metadata", "utils/scarb-test-support", diff --git a/plugins/cairo-lang-macro-attributes/README.md b/plugins/cairo-lang-macro-attributes/README.md index 5c0d15e0a..f71fd9dfe 100644 --- a/plugins/cairo-lang-macro-attributes/README.md +++ b/plugins/cairo-lang-macro-attributes/README.md @@ -1,3 +1,3 @@ -# cairo-lang-macro-interface +# cairo-lang-macro Shared interface for Scarb procedural macros. diff --git a/plugins/cairo-lang-macro-attributes/src/lib.rs b/plugins/cairo-lang-macro-attributes/src/lib.rs index b793e2d26..5a4d6ca29 100644 --- a/plugins/cairo-lang-macro-attributes/src/lib.rs +++ b/plugins/cairo-lang-macro-attributes/src/lib.rs @@ -16,10 +16,10 @@ pub fn attribute_macro(_args: TokenStream, input: TokenStream) -> TokenStream { #item #[no_mangle] - pub unsafe extern "C" fn expand(token_stream: cairo_lang_macro_interface::stable_abi::StableTokenStream) -> cairo_lang_macro_interface::stable_abi::StableProcMacroResult { + pub unsafe extern "C" fn expand(token_stream: cairo_lang_macro::stable_abi::StableTokenStream) -> cairo_lang_macro::stable_abi::StableProcMacroResult { let token_stream = token_stream.into_token_stream(); let result = #item_name(token_stream); - cairo_lang_macro_interface::stable_abi::StableProcMacroResult::from_proc_macro_result(result) + cairo_lang_macro::stable_abi::StableProcMacroResult::from_proc_macro_result(result) } }; TokenStream::from(expanded) diff --git a/plugins/cairo-lang-macro-interface/Cargo.toml b/plugins/cairo-lang-macro/Cargo.toml similarity index 93% rename from plugins/cairo-lang-macro-interface/Cargo.toml rename to plugins/cairo-lang-macro/Cargo.toml index 8651c75a2..176eb6d1e 100644 --- a/plugins/cairo-lang-macro-interface/Cargo.toml +++ b/plugins/cairo-lang-macro/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cairo-lang-macro-interface" +name = "cairo-lang-macro" version = "0.0.1" edition.workspace = true diff --git a/plugins/cairo-lang-macro-interface/README.md b/plugins/cairo-lang-macro/README.md similarity index 61% rename from plugins/cairo-lang-macro-interface/README.md rename to plugins/cairo-lang-macro/README.md index 5c0d15e0a..f71fd9dfe 100644 --- a/plugins/cairo-lang-macro-interface/README.md +++ b/plugins/cairo-lang-macro/README.md @@ -1,3 +1,3 @@ -# cairo-lang-macro-interface +# cairo-lang-macro Shared interface for Scarb procedural macros. diff --git a/plugins/cairo-lang-macro-interface/src/lib.rs b/plugins/cairo-lang-macro/src/lib.rs similarity index 100% rename from plugins/cairo-lang-macro-interface/src/lib.rs rename to plugins/cairo-lang-macro/src/lib.rs diff --git a/plugins/cairo-lang-macro-interface/src/stable_abi.rs b/plugins/cairo-lang-macro/src/stable_abi.rs similarity index 100% rename from plugins/cairo-lang-macro-interface/src/stable_abi.rs rename to plugins/cairo-lang-macro/src/stable_abi.rs diff --git a/scarb/Cargo.toml b/scarb/Cargo.toml index 07f561468..4f73f8182 100644 --- a/scarb/Cargo.toml +++ b/scarb/Cargo.toml @@ -51,7 +51,7 @@ petgraph.workspace = true redb.workspace = true reqwest.workspace = true scarb-build-metadata = { path = "../utils/scarb-build-metadata" } -cairo-lang-macro-interface = { path = "../plugins/cairo-lang-macro-interface" } +cairo-lang-macro = { path = "../plugins/cairo-lang-macro" } scarb-metadata = { path = "../scarb-metadata", default-features = false, features = ["builder"] } scarb-ui = { path = "../utils/scarb-ui" } semver.workspace = true