chore: move dependencies into the workspace and inherit from there

This commit is contained in:
Amaan Qureshi 2024-02-08 06:43:21 -05:00
parent 7980669267
commit a969fc428c
9 changed files with 141 additions and 155 deletions

79
Cargo.lock generated
View file

@ -132,7 +132,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
"syn 2.0.48",
"syn",
"which 4.4.2",
]
@ -204,7 +204,7 @@ checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
dependencies = [
"glob",
"libc",
"libloading 0.8.1",
"libloading",
]
[[package]]
@ -238,7 +238,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.48",
"syn",
]
[[package]]
@ -394,7 +394,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e"
dependencies = [
"quote",
"syn 2.0.48",
"syn",
]
[[package]]
@ -419,33 +419,13 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
[[package]]
name = "dirs"
version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309"
dependencies = [
"dirs-sys 0.3.7",
]
[[package]]
name = "dirs"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
dependencies = [
"dirs-sys 0.4.1",
]
[[package]]
name = "dirs-sys"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
dependencies = [
"libc",
"redox_users",
"winapi",
"dirs-sys",
]
[[package]]
@ -685,16 +665,6 @@ version = "0.2.153"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "libloading"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if",
"winapi",
]
[[package]]
name = "libloading"
version = "0.8.1"
@ -883,7 +853,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5"
dependencies = [
"proc-macro2",
"syn 2.0.48",
"syn",
]
[[package]]
@ -1068,7 +1038,7 @@ checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
"syn",
]
[[package]]
@ -1134,17 +1104,6 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "syn"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.48"
@ -1191,7 +1150,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
"syn",
]
[[package]]
@ -1274,7 +1233,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
"syn",
]
[[package]]
@ -1308,7 +1267,7 @@ dependencies = [
"ctor",
"ctrlc",
"difference",
"dirs 5.0.1",
"dirs",
"glob",
"html-escape",
"indexmap",
@ -1348,7 +1307,7 @@ name = "tree-sitter-config"
version = "0.19.0"
dependencies = [
"anyhow",
"dirs 3.0.2",
"dirs",
"serde",
"serde_json",
]
@ -1369,8 +1328,8 @@ version = "0.20.0"
dependencies = [
"anyhow",
"cc",
"dirs 3.0.2",
"libloading 0.7.4",
"dirs",
"libloading",
"once_cell",
"regex",
"serde",
@ -1378,7 +1337,7 @@ dependencies = [
"tree-sitter",
"tree-sitter-highlight",
"tree-sitter-tags",
"which 4.4.2",
"which 6.0.0",
]
[[package]]
@ -1398,7 +1357,7 @@ dependencies = [
"proc-macro2",
"quote",
"rand",
"syn 1.0.109",
"syn",
]
[[package]]
@ -1494,7 +1453,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.48",
"syn",
"wasm-bindgen-shared",
]
@ -1516,7 +1475,7 @@ checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -1748,7 +1707,7 @@ source = "git+https://github.com/bytecodealliance/wasmtime?rev=v16.0.0#6613acd1e
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
"syn",
]
[[package]]
@ -2069,5 +2028,5 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
"syn",
]

View file

@ -1,6 +1,6 @@
[workspace]
default-members = ["cli"]
members = ["cli", "lib"]
members = ["cli", "cli/config", "cli/loader", "lib", "tags", "highlight"]
resolver = "2"
[workspace.package]
@ -8,15 +8,61 @@ rust-version = "1.70"
[profile.optimize]
inherits = "release"
strip = true # Automatically strip symbols from the binary.
lto = true # Link-time optimization.
opt-level = 3 # Optimization level 3.
codegen-units = 1 # Maximum size reduction optimizations.
strip = true # Automatically strip symbols from the binary.
lto = true # Link-time optimization.
opt-level = 3 # Optimization level 3.
codegen-units = 1 # Maximum size reduction optimizations.
[profile.size]
inherits = "optimize"
opt-level = "s" # Optimize for size.
opt-level = "s" # Optimize for size.
[profile.profile]
inherits = "optimize"
strip = false
[workspace.dependencies]
ansi_term = "0.12.1"
anstyle = "1.0.6"
anyhow = "1.0.79"
cc = "1.0.83"
clap = { version = "4.4.18", features = [
"cargo",
"derive",
"env",
"help",
"unstable-styles",
] }
ctor = "0.2.6"
ctrlc = { version = "3.4.2", features = ["termination"] }
difference = "2.0.0"
dirs = "5.0.1"
glob = "0.3.1"
html-escape = "0.2.13"
indexmap = "2.2.2"
indoc = "2.0.4"
lazy_static = "1.4.0"
libloading = "0.8.1"
log = { version = "0.4.20", features = ["std"] }
memchr = "2.7.1"
once_cell = "1.19.0"
path-slash = "0.2.1"
pretty_assertions = "1.4.0"
rand = "0.8.5"
regex = "1.10.3"
regex-syntax = "0.8.2"
rustc-hash = "1.1.0"
semver = "1.0.21"
serde = { version = "1.0.196", features = ["derive"] }
serde_derive = "1.0.196"
serde_json = { version = "1.0.113", features = ["preserve_order"] }
smallbitvec = "2.5.1"
tempfile = "3.10.0"
thiserror = "1.0.56"
tiny_http = "0.12.0"
toml = "0.8.10"
unindent = "0.2.3"
walkdir = "2.4.0"
wasmparser = "0.121.0"
webbrowser = "0.8.12"
which = "6.0.0"

View file

@ -21,41 +21,36 @@ name = "benchmark"
harness = false
[features]
# default = ["wasm"]
wasm = ["tree-sitter/wasm", "tree-sitter-loader/wasm"]
[dependencies]
ansi_term = "0.12.1"
anstyle = "1.0.4"
anyhow = "1.0.72"
clap = { version = "4.4.18", features = [
"cargo",
"derive",
"env",
"help",
"unstable-styles",
] }
ctrlc = { version = "3.4.0", features = ["termination"] }
difference = "2.0.0"
dirs = "5.0.1"
glob = "0.3.1"
html-escape = "0.2.13"
indexmap = "2.0.0"
lazy_static = "1.4.0"
memchr = "2.7.1"
path-slash = "0.2.1"
regex = "1.9.1"
regex-syntax = "0.8"
rustc-hash = "1.1.0"
semver = "1.0.18"
serde = "1.0.188"
serde_derive = "1.0"
smallbitvec = "2.5.1"
tiny_http = "0.12.0"
walkdir = "2.3.3"
wasmparser = "0.121"
webbrowser = "0.8.10"
which = "6.0.0"
ansi_term.workspace = true
anstyle.workspace = true
anyhow.workspace = true
clap.workspace = true
ctrlc.workspace = true
difference.workspace = true
dirs.workspace = true
glob.workspace = true
html-escape.workspace = true
indexmap.workspace = true
lazy_static.workspace = true
log.workspace = true
memchr.workspace = true
path-slash.workspace = true
regex.workspace = true
regex-syntax.workspace = true
rustc-hash.workspace = true
semver.workspace = true
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
smallbitvec.workspace = true
tiny_http.workspace = true
walkdir.workspace = true
wasmparser.workspace = true
webbrowser.workspace = true
which.workspace = true
[dependencies.tree-sitter]
version = "0.20.10"
@ -66,34 +61,26 @@ version = "0.19.0"
path = "config"
[dependencies.tree-sitter-highlight]
version = "0.20"
version = "0.20.2"
path = "../highlight"
[dependencies.tree-sitter-loader]
version = "0.20"
version = "0.20.0"
path = "loader"
[dependencies.tree-sitter-tags]
version = "0.20"
version = "0.20.2"
path = "../tags"
[dependencies.serde_json]
version = "1.0"
features = ["preserve_order"]
[dependencies.log]
version = "0.4.19"
features = ["std"]
[dev-dependencies]
tree_sitter_proc_macro = { path = "src/tests/proc_macro", package = "tree-sitter-tests-proc-macro" }
rand = "0.8.5"
tempfile = "3.6.0"
pretty_assertions = "1.4.0"
ctor = "0.2.4"
unindent = "0.2.2"
indoc = "2.0.3"
rand.workspace = true
tempfile.workspace = true
pretty_assertions.workspace = true
ctor.workspace = true
unindent.workspace = true
indoc.workspace = true
[build-dependencies]
toml = "0.8.9"
toml.workspace = true

View file

@ -3,7 +3,7 @@ name = "tree-sitter-config"
description = "User configuration of tree-sitter's command line programs"
version = "0.19.0"
authors = ["Max Brunsfeld <maxbrunsfeld@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT"
readme = "README.md"
keywords = ["incremental", "parsing"]
@ -12,10 +12,7 @@ repository = "https://github.com/tree-sitter/tree-sitter"
rust-version.workspace = true
[dependencies]
anyhow = "1.0"
dirs = "3.0"
serde = { version = "1.0", features = ["derive"] }
[dependencies.serde_json]
version = "1.0"
features = ["preserve_order"]
anyhow.workspace = true
dirs.workspace = true
serde.workspace = true
serde_json.workspace = true

View file

@ -3,7 +3,7 @@ name = "tree-sitter-loader"
description = "Locates, builds, and loads tree-sitter grammars at runtime"
version = "0.20.0"
authors = ["Max Brunsfeld <maxbrunsfeld@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT"
readme = "README.md"
keywords = ["incremental", "parsing"]
@ -15,27 +15,24 @@ rust-version.workspace = true
wasm = ["tree-sitter/wasm"]
[dependencies]
anyhow = "1.0"
cc = "^1.0.58"
dirs = "3.0"
libloading = "0.7"
once_cell = "1.7"
regex = "1"
serde = { version = "1.0", features = ["derive"] }
which = "4.1.0"
[dependencies.serde_json]
version = "1.0"
features = ["preserve_order"]
anyhow.workspace = true
cc.workspace = true
dirs.workspace = true
libloading.workspace = true
once_cell.workspace = true
regex.workspace = true
serde.workspace = true
serde_json.workspace = true
which.workspace = true
[dependencies.tree-sitter]
version = "0.20"
version = "0.20.10"
path = "../../lib"
[dependencies.tree-sitter-highlight]
version = "0.20"
version = "0.20.2"
path = "../../highlight"
[dependencies.tree-sitter-tags]
version = "0.20"
version = "0.20.2"
path = "../../tags"

View file

@ -9,7 +9,7 @@ rust-version.workspace = true
proc-macro = true
[dependencies]
proc-macro2 = "1.0.63"
quote = "1"
proc-macro2 = "1.0.78"
quote = "1.0.35"
rand = "0.8.5"
syn = { version = "1", features = ["full"] }
syn = { version = "2.0.48", features = ["full"] }

View file

@ -8,7 +8,7 @@ authors = [
]
license = "MIT"
readme = "README.md"
edition = "2018"
edition = "2021"
keywords = ["incremental", "parsing", "syntax", "highlighting"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter"
@ -18,10 +18,10 @@ rust-version.workspace = true
crate-type = ["lib", "staticlib"]
[dependencies]
lazy_static = "1.4.0"
regex = "1.9.1"
thiserror = "1.0.43"
lazy_static.workspace = true
regex.workspace = true
thiserror.workspace = true
[dependencies.tree-sitter]
version = "0.20"
version = "0.20.10"
path = "../lib"

View file

@ -27,7 +27,7 @@ include = [
wasm = ["wasmtime", "wasmtime-c-api"]
[dependencies]
regex = "1.9.1"
regex.workspace = true
[dependencies.wasmtime]
git = "https://github.com/bytecodealliance/wasmtime"
@ -45,7 +45,7 @@ default-features = false
[build-dependencies]
bindgen = { version = "0.69.4", optional = true }
cc = "1.0.79"
cc.workspace = true
[lib]
path = "binding_rust/lib.rs"

View file

@ -8,7 +8,7 @@ authors = [
]
license = "MIT"
readme = "README.md"
edition = "2018"
edition = "2021"
keywords = ["incremental", "parsing", "syntax", "tagging"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter"
@ -18,10 +18,10 @@ rust-version.workspace = true
crate-type = ["lib", "staticlib"]
[dependencies]
regex = "1.9.1"
memchr = "2.5.0"
thiserror = "1.0.43"
regex.workspace = true
memchr.workspace = true
thiserror.workspace = true
[dependencies.tree-sitter]
version = "0.20"
version = "0.20.10"
path = "../lib"