From 10712005eae997fb8cb58b284aad81e45b69452d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20D=C3=B6nszelmann?= Date: Thu, 6 Jun 2024 10:01:45 +0200 Subject: [PATCH 1/4] add workspace keys --- Cargo.toml | 24 +++++++++++++++++ scopegraphs-macros/Cargo.toml | 31 +++++++++------------- scopegraphs-regular-expressions/Cargo.toml | 27 ++++++++----------- scopegraphs-render-docs/Cargo.toml | 11 ++++---- scopegraphs/Cargo.toml | 27 ++++++++----------- 5 files changed, 65 insertions(+), 55 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 95f4c41..4a8bf63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,3 +12,27 @@ default-members = [ "scopegraphs-regular-expressions", "scopegraphs-render-docs", ] + +[workspace.package] +version = "0.3.1" +authors = [ + "Aron Zwaan ", + "Jonathan Dönszelmann " +] +description = "A well-documented port of scopegraphs to Rust" +license = "MIT OR Apache-2.0" +edition = "2021" +rust-version = "1.75" +repository = "https://github.com/metaborg/rust-scopegraphs" +documentation = "https://docs.rs/scopegraphs" + +[workspace.dependencies] +quote = "1" +syn = "2" +proc-macro2 = "1" +thiserror = "1" + +scopegraphs = { path = "./scopegraphs", version = "0.3.1" } +scopegraphs-macros = { path = "./scopegraphs-macros", version = "0.3.1" } +scopegraphs-regular-expressions = { path = "./scopegraphs-regular-expressions", version = "0.3.1" } +scopegraphs-render-docs = { path = "./scopegraphs-render-docs", version = "0.3.1" } diff --git a/scopegraphs-macros/Cargo.toml b/scopegraphs-macros/Cargo.toml index 25c2b16..cb769c7 100644 --- a/scopegraphs-macros/Cargo.toml +++ b/scopegraphs-macros/Cargo.toml @@ -1,30 +1,25 @@ [package] name = "scopegraphs-macros" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" -authors = [ - "Aron Zwaan ", - "Jonathan Dönszelmann " -] -description = "A port of scopegraphs (https://pl.ewi.tudelft.nl/research/projects/scope-graphs/) to Rust" -repository = "https://github.com/metaborg/rust-scopegraphs/" -rust-version = "1.75" - +version.workspace = true +edition.workspace = true +license.workspace = true +authors.workspace = true +description.workspace = true +repository.workspace = true +rust-version.workspace = true [lib] proc-macro = true -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] -syn = { version = "2", features = [] } -quote = "1" -scopegraphs-regular-expressions = { path = "../scopegraphs-regular-expressions", features = ["dot"], version = "0.3" } -proc-macro2 = "1" +syn.workspace = true +quote.workspace = true +proc-macro2.workspace = true + +scopegraphs-regular-expressions = { workspace = true, features = ["dot"] } [dev-dependencies] -scopegraphs = { path = "../scopegraphs" } +scopegraphs.workspace = true [features] dot = ["scopegraphs-regular-expressions/dot"] diff --git a/scopegraphs-regular-expressions/Cargo.toml b/scopegraphs-regular-expressions/Cargo.toml index 68b7ffd..a74328a 100644 --- a/scopegraphs-regular-expressions/Cargo.toml +++ b/scopegraphs-regular-expressions/Cargo.toml @@ -1,23 +1,18 @@ [package] name = "scopegraphs-regular-expressions" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" -authors = [ - "Aron Zwaan ", - "Jonathan Dönszelmann " -] -description = "A port of scopegraphs (https://pl.ewi.tudelft.nl/research/projects/scope-graphs/) to Rust" -repository = "https://github.com/metaborg/rust-scopegraphs/" -rust-version = "1.75" +version.workspace = true +edition.workspace = true +license.workspace = true +authors.workspace = true +description.workspace = true +repository.workspace = true +rust-version.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -syn = { version = "2", default-features = false, features = ["parsing", "derive", "printing", "clone-impls"] } -quote = { version = "1" } -proc-macro2 = "1" -thiserror = "1" +syn.workspace = true +quote.workspace = true +proc-macro2.workspace = true +thiserror.workspace = true [features] dot = [] diff --git a/scopegraphs-render-docs/Cargo.toml b/scopegraphs-render-docs/Cargo.toml index f202476..57ad21d 100644 --- a/scopegraphs-render-docs/Cargo.toml +++ b/scopegraphs-render-docs/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "scopegraphs-render-docs" -version = "0.3.0" +version.workspace = true authors = ["Mike Lubinets ", "Frank Rehberger ", "Jonathan Dönszelmann "] description = "Derived from Aquamarine, a mermaid.js integration for rustdoc, renders scopegraphs by executing doctests to generate mermaid" keywords = ["proc_macro", "docs", "rustdoc", "mermaid", "diagram"] categories = ["visualization", "development-tools::build-utils"] -repository = "https://github.com/metaborg/rust-scopegraphs/" +repository.workspace = true +rust-version.workspace = true edition = "2018" license = "MIT" include = ["src/**/*", "Cargo.toml", "doc/js/**"] @@ -14,11 +15,11 @@ include = ["src/**/*", "Cargo.toml", "doc/js/**"] proc-macro = true [dependencies] -quote = "1" -proc-macro2 = "1" +quote.workspace = true +proc-macro2.workspace = true +syn.workspace = true proc-macro-error = { version = "1", default-features = false } itertools = "0.13" -syn = "2" include_dir = "0.7" uuid = { version = "1.8", features = ["v4"] } diff --git a/scopegraphs/Cargo.toml b/scopegraphs/Cargo.toml index e3935e7..703b355 100644 --- a/scopegraphs/Cargo.toml +++ b/scopegraphs/Cargo.toml @@ -1,28 +1,23 @@ [package] name = "scopegraphs" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" -authors = [ - "Aron Zwaan ", - "Jonathan Dönszelmann ", -] -description = "A port of scopegraphs https://pl.ewi.tudelft.nl/research/projects/scope-graphs/ to Rust" -repository = "https://github.com/metaborg/rust-scopegraphs/" -rust-version = "1.75" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +version.workspace = true +edition.workspace = true +license.workspace = true +authors.workspace = true +description.workspace = true +repository.workspace = true +rust-version.workspace = true [dependencies] futures = { version = "0.3", default-features = false, features = ["std"] } bumpalo = "3" -scopegraphs-prust-lib = { version = "0.1.0" } +scopegraphs-prust-lib = "0.1.0" log = "0.4" -scopegraphs-macros = { path = "../scopegraphs-macros", version = "0.3" } -scopegraphs-regular-expressions = { path = "../scopegraphs-regular-expressions", version = "0.3" } -scopegraphs-render-docs = { path = "../scopegraphs-render-docs", version = "0.3", optional = true } +scopegraphs-macros.workspace = true +scopegraphs-regular-expressions.workspace = true +scopegraphs-render-docs = { workspace = true, optional = true } [dev-dependencies] env_logger = "0.11" From 3ff98420576b387b27cf93cdba284aeb22f38405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20D=C3=B6nszelmann?= Date: Thu, 6 Jun 2024 10:07:55 +0200 Subject: [PATCH 2/4] add publish script to justfile --- Justfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Justfile b/Justfile index 9c614ca..e3a7f88 100644 --- a/Justfile +++ b/Justfile @@ -1,2 +1,8 @@ watch-docs: cargo +nightly watch -s 'cargo +nightly docs-rs -p scopegraphs && browser-sync start --ss target/x86_64-unknown-linux-gnu/doc -s target/x86_64-unknown-linux-gnu/doc --directory --no-open' + +publish: + cargo publish -p scopegraphs-render-docs + cargo publish -p scopegraphs-regular-expressions + cargo publish -p scopegraphs-macros + cargo publish -p scopegraphs From 83dbb9bfcd46b8b1865ea33e5ee2093a89b72e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20D=C3=B6nszelmann?= Date: Thu, 6 Jun 2024 10:21:39 +0200 Subject: [PATCH 3/4] publish 0.3.2 --- Cargo.toml | 10 +++++----- Justfile | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4a8bf63..069cdd5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ default-members = [ ] [workspace.package] -version = "0.3.1" +version = "0.3.2" authors = [ "Aron Zwaan ", "Jonathan Dönszelmann " @@ -32,7 +32,7 @@ syn = "2" proc-macro2 = "1" thiserror = "1" -scopegraphs = { path = "./scopegraphs", version = "0.3.1" } -scopegraphs-macros = { path = "./scopegraphs-macros", version = "0.3.1" } -scopegraphs-regular-expressions = { path = "./scopegraphs-regular-expressions", version = "0.3.1" } -scopegraphs-render-docs = { path = "./scopegraphs-render-docs", version = "0.3.1" } +scopegraphs = { path = "./scopegraphs", version = "0.3" } +scopegraphs-macros = { path = "./scopegraphs-macros", version = "0.3.2" } +scopegraphs-regular-expressions = { path = "./scopegraphs-regular-expressions", version = "0.3.2" } +scopegraphs-render-docs = { path = "./scopegraphs-render-docs", version = "0.3.2" } diff --git a/Justfile b/Justfile index e3a7f88..16bdc06 100644 --- a/Justfile +++ b/Justfile @@ -3,6 +3,9 @@ watch-docs: publish: cargo publish -p scopegraphs-render-docs + sleep 10 cargo publish -p scopegraphs-regular-expressions + sleep 10 cargo publish -p scopegraphs-macros + sleep 10 cargo publish -p scopegraphs From 7555b3b8b345af63300640bdd8d6526bc09f6bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20D=C3=B6nszelmann?= Date: Thu, 6 Jun 2024 10:28:48 +0200 Subject: [PATCH 4/4] comment on version of scopegraphs --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 069cdd5..6978c17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,9 @@ syn = "2" proc-macro2 = "1" thiserror = "1" +# note this version should stay lower. +# Scopegraphs is a dev-dependency of scopegraphs-macros, and we deploy scopegraphs macros first. +# By that time, scopegraphs is not yet released at the right version. scopegraphs = { path = "./scopegraphs", version = "0.3" } scopegraphs-macros = { path = "./scopegraphs-macros", version = "0.3.2" } scopegraphs-regular-expressions = { path = "./scopegraphs-regular-expressions", version = "0.3.2" }