Skip to content

Commit

Permalink
refactor: move to workspace dependencies (#569)
Browse files Browse the repository at this point in the history
Move all dependencies to workspace dependencies to ensure we have no
duplicates. I only left two versions of `notify` because it would be a
relatively big refactor.

I used https://github.com/mainmatter/cargo-autoinherit to automate most
of this.
  • Loading branch information
baszalmstra authored Jul 16, 2024
1 parent 3884019 commit 0abe87f
Show file tree
Hide file tree
Showing 23 changed files with 405 additions and 332 deletions.
79 changes: 79 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,85 @@ members = [
]
resolver = "2"

[workspace.package]
version = "0.6.0-dev"
authors = ["The Mun Team <[email protected]>"]
edition = "2021"
documentation = "https://docs.mun-lang.org/v0.4"
readme = "README.md"
homepage = "https://mun-lang.org"
repository = "https://github.com/mun-lang/mun"
license = "MIT OR Apache-2.0"
categories = ["game-development"]

[workspace.dependencies]
annotate-snippets = { version = "0.10.0", default-features = false }
anyhow = { version = "1.0.75", default-features = false }
apple-codesign = { git = "https://github.com/baszalmstra/apple-platform-rs.git", branch = "fix/disabled_features", default-features = false }
array-init = { version = "2.1.0", default-features = false }
bitflags = { version = "2.5.0", default-features = false }
by_address = { version = "1.1.0", default-features = false }
bytecount = { version = "0.6.7", default-features = false }
bytemuck = { version = "1.14.0", default-features = false }
cargo-husky = { version = "1", default-features = false }
cbindgen = { version = "0.24.5", default-features = false }
clap = { version = "4.4.11", default-features = false }
crossbeam-channel = { version = "0.5.9", default-features = false }
ctrlc = { version = "3.4", default-features = false }
difference = "2.0"
drop_bomb = { version = "0.1.5", default-features = false }
either = { version = "1.9.0", default-features = false }
ena = { version = "0.14", default-features = false }
extendhash = { version = "1.0.10", default-features = false }
heck = "0.4.1"
inkwell = { version = "0.2.0", default-features = false }
insta = { version = "1.34.0", default-features = false }
itertools = { version = "0.12.0", default-features = false }
la-arena = { version = "0.3.1", default-features = false }
lazy_static = { version = "1.4.0", default-features = false }
libloading = { version = "0.8.1", default-features = false }
lld_rs = { version = "140.0.0", default-features = false }
lockfile = { version = "0.4.0", default-features = false }
log = { version = "0.4.20", default-features = false }
lsp-server = { version = "0.7.5", default-features = false }
lsp-types = { version = "=0.95.0", default-features = false }
mdbook = { version = "0.4.36", default-features = false }
once_cell = { version = "1.19.0", default-features = false }
parking_lot = { version = "0.12.1", default-features = false }
paste = { version = "1.0.14", default-features = false }
pretty_env_logger = { version = "0.5.0", default-features = false }
proc-macro2 = { version = "1.0", default-features = false }
pulldown-cmark = { version = "0.9.3", default-features = false }
quote = { version = "1.0", default-features = false }
ra_ap_text_edit = { version = "0.0.190", default-features = false }
relative-path = { version = "1.9", default-features = false }
ron = "0.8.1"
rowan = { version = "0.15.15", default-features = false }
rustc-hash = { version = "1.1.0", default-features = false }
salsa = { version = "0.16.1", default-features = false }
semver = { version = "1.0", default-features = false }
seq-macro = { version = "0.3.5", default-features = false }
serde = { version = "1.0.193", default-features = false }
serde_derive = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false }
smallvec = { version = "1.11.2", default-features = false }
smol_str = { version = "0.2.1", default-features = false }
syn = { version = "2.0", default-features = false }
tempdir = { version = "0.3.7", default-features = false }
tempfile = { version = "3.8", default-features = false }
tera = { version = "1.19.1", default-features = false }
termcolor = { version = "1.1", default-features = false }
text-size = { version = "1.1.1", default-features = false }
text_trees = { version = "0.1.2", default-features = false }
thiserror = { version = "1.0.51", default-features = false }
threadpool = { version = "1.8.1", default-features = false }
toml = { version = "0.8.8", default-features = false }
unicode-xid = { version = "0.2.4", default-features = false }
walkdir = { version = "2.4.0", default-features = false }
yansi-term = { version = "0.1.2", default-features = false }
notify = { version = "5.2.0" }
winapi = { version = "0.3.9", default-features = false }

[profile.dev]
rpath = true

Expand Down
34 changes: 15 additions & 19 deletions crates/mun/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
[package]
name = "mun"
version = "0.6.0-dev"
authors = ["The Mun Team <[email protected]>"]
edition = "2021"
description = "Command-line interface for compiling, monitoring and running Mun code"
documentation = "https://docs.mun-lang.org/v0.4"
readme = "README.md"
homepage = "https://mun-lang.org"
repository = "https://github.com/mun-lang/mun"
license = "MIT OR Apache-2.0"
keywords = ["game", "hot-reloading", "language", "mun", "scripting"]
categories = ["command-line-interface", "game-development", "mun"]
categories = ["command-line-interface", "game-development"]
default-run = "mun"
version.workspace = true
authors.workspace = true
edition.workspace = true
documentation.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true

[dependencies]
anyhow = { version = "1.0.75", default-features = false }
clap = { version = "4.4.11", default-features = false, features = ["std", "derive"] }
log = { version = "0.4", default-features = false }
pretty_env_logger = { version = "0.5.0", default-features = false }
anyhow = { workspace = true }
clap = { workspace = true, features = ["std", "derive"] }
log = { workspace = true }
pretty_env_logger = { workspace = true }
mun_abi = { version = "0.6.0-dev", path = "../mun_abi" }
mun_compiler = { version = "0.6.0-dev", path = "../mun_compiler" }
mun_compiler_daemon = { version = "0.6.0-dev", path = "../mun_compiler_daemon" }
mun_runtime = { version = "0.6.0-dev", path = "../mun_runtime" }
mun_language_server = { version = "0.6.0-dev", path = "../mun_language_server" }
mun_project = { version = "0.6.0-dev", path = "../mun_project" }

[dev-dependencies.cargo-husky]
version = "1"
default-features = false
features = ["user-hooks"]

[dev-dependencies]
tempfile = "3.8"
cargo-husky = { workspace = true, features = ["user-hooks"] }
tempfile = { workspace = true }
mun_skeptic = { path = "../mun_skeptic", version = "0.6.0-dev" }

[build-dependencies]
Expand Down
28 changes: 14 additions & 14 deletions crates/mun_abi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[package]
name = "mun_abi"
version = "0.6.0-dev"
authors = ["The Mun Team <[email protected]>"]
edition = "2021"
description = "Rust wrapper for the Mun ABI"
documentation = "https://docs.mun-lang.org/v0.4"
readme = "README.md"
homepage = "https://mun-lang.org"
repository = "https://github.com/mun-lang/mun"
license = "MIT OR Apache-2.0"
keywords = ["game", "hot-reloading", "language", "mun", "scripting"]
categories = ["api-bindings", "game-development", "mun"]
categories = ["api-bindings", "game-development"]
version.workspace = true
authors.workspace = true
edition.workspace = true
documentation.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true

[dependencies]
once_cell = "1.19.0"
itertools = { version = "0.12.0", default-features = false }
parking_lot = { version = "0.12.1", default-features = false }
extendhash = { version = "1.0.10", default-features = false }
serde = { version = "1.0.193", default-features = false, optional = true }
once_cell = { workspace = true, features = ["std", "critical-section"] }
itertools = { workspace = true }
parking_lot = { workspace = true }
extendhash = { workspace = true }
serde = { workspace = true, optional = true }
20 changes: 10 additions & 10 deletions crates/mun_capi_utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "mun_capi_utils"
version = "0.6.0-dev"
edition = "2021"
authors = ["The Mun Team <[email protected]>"]
description = "Common functionality between C api crates."
documentation = "https://docs.mun-lang.org/v0.4"
readme = "README.md"
homepage = "https://mun-lang.org"
repository = "https://github.com/mun-lang/mun"
license = "MIT OR Apache-2.0"
keywords = ["game", "hot-reloading", "language", "mun", "scripting"]
categories = ["game-development", "mun"]
categories.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
documentation.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true

[dependencies]
insta = { version = "1.34.0", default-features = false, features = ["ron"], optional = true }
insta = { workspace = true, features = ["ron"], optional = true }
52 changes: 26 additions & 26 deletions crates/mun_codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
[package]
name = "mun_codegen"
version = "0.6.0-dev"
authors = ["The Mun Team <[email protected]>"]
edition = "2021"
description = "LLVM IR code generation for Mun"
documentation = "https://docs.mun-lang.org/v0.4"
readme = "README.md"
homepage = "https://mun-lang.org"
repository = "https://github.com/mun-lang/mun"
license = "MIT OR Apache-2.0"
keywords = ["game", "hot-reloading", "language", "mun", "scripting"]
categories = ["Game development", "Mun"]
categories.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
documentation.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true

[dependencies]
mun_abi = { version = "0.6.0-dev", path = "../mun_abi" }
anyhow = { version = "1.0.75", default-features = false, features = ["std"] }
apple-codesign = { version = "0.26.0", default-features = false, git = "https://github.com/baszalmstra/apple-platform-rs.git", branch = "fix/disabled_features" }
array-init = { version = "2.1.0", default-features = false }
by_address = { version = "1.1.0", default-features = false }
bytemuck = { version = "1.14.0", default-features = false }
anyhow = { workspace = true, features = ["std"] }
apple-codesign = { workspace = true }
array-init = { workspace = true }
by_address = { workspace = true }
bytemuck = { workspace = true }
mun_hir = { version = "0.6.0-dev", path = "../mun_hir" }
inkwell = { version = "0.2.0", default-features = false, features = ["llvm14-0", "target-x86", "target-aarch64"] }
itertools = { version = "0.12.0", default-features = false }
inkwell = { workspace = true, features = ["llvm14-0", "target-x86", "target-aarch64"] }
itertools = { workspace = true }
mun_codegen_macros = { version = "0.6.0-dev", path = "../mun_codegen_macros" }
mun_target = { version = "0.6.0-dev", path = "../mun_target" }
once_cell = { version = "1.19.0", default-features = false }
lld_rs = { version = "140.0.0", default-features = false }
parking_lot = { version = "0.12.1", default-features = false }
paste = { version = "1.0.14", default-features = false }
once_cell = { workspace = true }
lld_rs = { workspace = true }
parking_lot = { workspace = true }
paste = { workspace = true }
mun_paths = { version = "0.6.0-dev", path = "../mun_paths" }
rustc-hash = { version = "1.1.0", default-features = false }
salsa = { version = "0.16.1", default-features = false }
smallvec = { version = "1.11.2", features = ["union"], default-features = false }
tempfile = { version = "3", default-features = false }
thiserror = { version = "1.0.51", default-features = false }
rustc-hash = { workspace = true }
salsa = { workspace = true }
smallvec = { workspace = true, features = ["union"] }
tempfile = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
mun_abi = { path = "../mun_abi", features = ["serde"] }
insta = { version = "1.34.0", default-features = false, features = ["ron"] }
insta = { workspace = true, features = ["ron"] }
mun_libloader = { path = "../mun_libloader" }
mun_test = { path = "../mun_test" }
mun_runtime = { path = "../mun_runtime" }
24 changes: 12 additions & 12 deletions crates/mun_codegen_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[package]
name = "mun_codegen_macros"
version = "0.6.0-dev"
authors = ["The Mun Team <[email protected]>"]
edition = "2021"
description = "Macros used by mun code generation"
documentation = "https://docs.mun-lang.org/v0.4"
readme = "README.md"
homepage = "https://mun-lang.org"
repository = "https://github.com/mun-lang/mun"
license = "MIT OR Apache-2.0"
keywords = ["game", "hot-reloading", "language", "mun", "scripting"]
categories = ["Game development", "Mun"]
categories.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
documentation.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true

[lib]
proc-macro = true

[dependencies]
proc-macro2 = { version = "1.0", default-features = false }
quote = { version = "1.0", default-features = false }
syn = { version = "2.0", default-features = false, features = ["derive", "parsing", "printing", "proc-macro"] }
proc-macro2 = { workspace = true }
quote = { workspace = true }
syn = { workspace = true, features = ["derive", "parsing", "printing", "proc-macro"] }
32 changes: 16 additions & 16 deletions crates/mun_compiler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "mun_compiler"
version = "0.6.0-dev"
authors = ["The Mun Team <[email protected]>"]
edition = "2021"
description = "Binary compilation functionality for Mun"
documentation = "https://docs.mun-lang.org/v0.4"
readme = "README.md"
homepage = "https://mun-lang.org"
repository = "https://github.com/mun-lang/mun"
license = "MIT OR Apache-2.0"
keywords = ["game", "hot-reloading", "language", "mun", "scripting"]
categories = ["game-development", "mun"]
categories.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
documentation.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true

[dependencies]
mun_codegen = { version = "0.6.0-dev", path = "../mun_codegen" }
Expand All @@ -20,12 +20,12 @@ mun_paths = { version = "0.6.0-dev", path = "../mun_paths" }
mun_target = { version = "0.6.0-dev", path = "../mun_target" }
mun_project = { version = "0.6.0-dev", path = "../mun_project" }
mun_diagnostics = { version = "0.6.0-dev", path = "../mun_diagnostics" }
annotate-snippets = { version = "0.10.0", default-features = false }
anyhow = { version = "1.0.75", default-features = false }
lockfile = { version = "0.4.0", default-features = false }
log = { version = "0.4", default-features = false }
walkdir = { version = "2.4", default-features = false }
yansi-term = { version = "0.1.2", default-features = false }
annotate-snippets = { workspace = true }
anyhow = { workspace = true }
lockfile = { workspace = true }
log = { workspace = true }
walkdir = { workspace = true }
yansi-term = { workspace = true }

[dev-dependencies]
insta = { version = "1.34.0", default-features = false }
insta = { workspace = true }
26 changes: 13 additions & 13 deletions crates/mun_compiler_daemon/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[package]
name = "mun_compiler_daemon"
version = "0.6.0-dev"
authors = ["The Mun Team <[email protected]>"]
edition = "2021"
description = "Functionality for continuously monitoring Mun source files for changes and triggering recompilation"
documentation = "https://docs.mun-lang.org/v0.4"
readme = "README.md"
homepage = "https://mun-lang.org"
repository = "https://github.com/mun-lang/mun"
license = "MIT OR Apache-2.0"
keywords = ["game", "hot-reloading", "language", "mun", "scripting"]
categories = ["game-development", "mun"]
categories.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
documentation.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true

[dependencies]
anyhow = { version = "1.0.75", default-features = false }
ctrlc = { version = "3.4", default-features = false }
log = { version = "0.4", default-features = false }
anyhow = { workspace = true }
ctrlc = { workspace = true }
log = { workspace = true }
mun_codegen = { version = "0.6.0-dev", path = "../mun_codegen" }
mun_compiler = { version = "0.6.0-dev", path = "../mun_compiler" }
mun_project = { version = "0.6.0-dev", path = "../mun_project" }
Expand All @@ -24,4 +24,4 @@ notify = { version = "4.0", default-features = false }

# Enable std feature for winapi through feature unification to ensure notify uses the correct `c_void` type
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.8", features = ["std"] }
winapi = { workspace = true, features = ["std"] }
Loading

0 comments on commit 0abe87f

Please sign in to comment.