Skip to content

Commit

Permalink
Merge pull request #54 from metaborg/workspace-package-management
Browse files Browse the repository at this point in the history
Workspace package management
  • Loading branch information
jdonszelmann authored Jun 6, 2024
2 parents 8a3cda7 + 7555b3b commit 43bddf1
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 55 deletions.
27 changes: 27 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,30 @@ default-members = [
"scopegraphs-regular-expressions",
"scopegraphs-render-docs",
]

[workspace.package]
version = "0.3.2"
authors = [
"Aron Zwaan <[email protected]>",
"Jonathan Dönszelmann <[email protected]>"
]
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"

# 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" }
scopegraphs-render-docs = { path = "./scopegraphs-render-docs", version = "0.3.2" }
9 changes: 9 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
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
sleep 10
cargo publish -p scopegraphs-regular-expressions
sleep 10
cargo publish -p scopegraphs-macros
sleep 10
cargo publish -p scopegraphs
31 changes: 13 additions & 18 deletions scopegraphs-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
[package]
name = "scopegraphs-macros"
version = "0.3.0"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = [
"Aron Zwaan <[email protected]>",
"Jonathan Dönszelmann <[email protected]>"
]
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"]
27 changes: 11 additions & 16 deletions scopegraphs-regular-expressions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
[package]
name = "scopegraphs-regular-expressions"
version = "0.3.0"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = [
"Aron Zwaan <[email protected]>",
"Jonathan Dönszelmann <[email protected]>"
]
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 = []
Expand Down
11 changes: 6 additions & 5 deletions scopegraphs-render-docs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "scopegraphs-render-docs"
version = "0.3.0"
version.workspace = true
authors = ["Mike Lubinets <[email protected]>", "Frank Rehberger <[email protected]>", "Jonathan Dönszelmann <[email protected]>"]
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/**"]
Expand All @@ -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"] }

Expand Down
27 changes: 11 additions & 16 deletions scopegraphs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
[package]
name = "scopegraphs"
version = "0.3.0"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = [
"Aron Zwaan <[email protected]>",
"Jonathan Dönszelmann <[email protected]>",
]
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"
Expand Down

0 comments on commit 43bddf1

Please sign in to comment.