diff --git a/Cargo.lock b/Cargo.lock index 1333b8e74..31e9323dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -754,10 +754,10 @@ dependencies = [ [[package]] name = "cairo-lang-macro" -version = "0.0.1" +version = "0.1.0" dependencies = [ - "cairo-lang-macro-attributes", - "cairo-lang-macro-stable", + "cairo-lang-macro-attributes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-macro-stable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "linkme", "serde", "serde_json", @@ -772,9 +772,26 @@ dependencies = [ "syn 2.0.72", ] +[[package]] +name = "cairo-lang-macro-attributes" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e32e958decd95ae122ee64daa26721da2f76e83231047f947fd9cdc5d3c90cc6" +dependencies = [ + "quote", + "scarb-stable-hash 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 2.0.72", +] + +[[package]] +name = "cairo-lang-macro-stable" +version = "1.0.0" + [[package]] name = "cairo-lang-macro-stable" version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c49906d6b1c215e5814be7c5c65ecf2328898b335bee8c2409ec07cfb5530daf" [[package]] name = "cairo-lang-parser" @@ -4588,7 +4605,7 @@ dependencies = [ "cairo-lang-formatter", "cairo-lang-lowering", "cairo-lang-macro", - "cairo-lang-macro-stable", + "cairo-lang-macro-stable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "cairo-lang-parser", "cairo-lang-semantic", "cairo-lang-sierra", diff --git a/MAINTAINING.md b/MAINTAINING.md index bd80a3e33..d322f01b2 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -167,6 +167,22 @@ Releasing `scarb-ui` crate is also a semi-automated process. 5. Push it. 6. Run `cargo publish -p scarb-ui`. +## `cairo-lang-macro` release procedure + +Releasing `cairo-lang-macro` crate is also a semi-automated process. + +1. Make sure correct version is present in: + 1. `plugins/cairo-lang-macro/Cargo.toml` + 2. `Cargo.lock` + You will probably have to commit changes and then tag newly created commit. +2. Make sure all changes to crates `cairo-lang-macro-attributes`, `cairo-lang-macro-stable`, `scarb-stable-hasher` are + released to crates.io as well. +3. Make sure you create it on a green commit (CI is passing), this is not verified! +4. Run `cargo publish -p cairo-lang-macro --dry-run` to verify that everything is fine. +5. Create a tag on `main` named `cairo-lang-macro/vX.Y.Z`. +6. Push it. +7. Run `cargo publish -p cairo-lang-macro`. + [@software-mansion/scarb-maintainers]: https://github.com/orgs/software-mansion/teams/scarb-maintainers [@maciektr]: https://github.com/maciektr diff --git a/plugins/cairo-lang-macro/CHANGELOG.md b/plugins/cairo-lang-macro/CHANGELOG.md new file mode 100644 index 000000000..fd3eae6c6 --- /dev/null +++ b/plugins/cairo-lang-macro/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## Unreleased + +## 0.1.0 (2024-07-31) + +- Initial release. diff --git a/plugins/cairo-lang-macro/Cargo.toml b/plugins/cairo-lang-macro/Cargo.toml index b4a25dc3b..a1815f00b 100644 --- a/plugins/cairo-lang-macro/Cargo.toml +++ b/plugins/cairo-lang-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cairo-lang-macro" -version = "0.0.1" +version = "0.1.0" edition.workspace = true authors.workspace = true @@ -13,8 +13,8 @@ readme = "README.md" repository.workspace = true [dependencies] -cairo-lang-macro-attributes = { path = "../cairo-lang-macro-attributes" } -cairo-lang-macro-stable = { path = "../cairo-lang-macro-stable" } +cairo-lang-macro-attributes = "0.1" +cairo-lang-macro-stable = "1" linkme.workspace = true [dev-dependencies] diff --git a/plugins/cairo-lang-macro/README.md b/plugins/cairo-lang-macro/README.md index f71fd9dfe..5f82b3b9f 100644 --- a/plugins/cairo-lang-macro/README.md +++ b/plugins/cairo-lang-macro/README.md @@ -1,3 +1,6 @@ -# cairo-lang-macro +# Cairo Lang Macro -Shared interface for Scarb procedural macros. +This crate exposes an API for writing Scarb procedural macros for Cairo language. +To learn more about Scarb procedural macros, please see the [Scarb documentation]. + +[Scarb documentation]: https://docs.swmansion.com/scarb/ diff --git a/scarb/Cargo.toml b/scarb/Cargo.toml index 7329ee03c..0f9cf52f5 100644 --- a/scarb/Cargo.toml +++ b/scarb/Cargo.toml @@ -23,7 +23,7 @@ cairo-lang-filesystem.workspace = true cairo-lang-formatter.workspace = true cairo-lang-lowering.workspace = true cairo-lang-macro = { path = "../plugins/cairo-lang-macro" } -cairo-lang-macro-stable = { path = "../plugins/cairo-lang-macro-stable" } +cairo-lang-macro-stable = "1" cairo-lang-parser.workspace = true cairo-lang-semantic.workspace = true cairo-lang-sierra-to-casm.workspace = true