Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move common dependencies to workspace Cargo.toml #1388

Merged
merged 3 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 67 additions & 67 deletions Cargo.lock

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,30 @@ codegen-units = 1
lto = true
panic = "abort"
strip = true

[workspace.dependencies]
ansi-to-tui = "=3.1.0"
anyhow = "1.0.86"
arc-swap = "1.7.1"
base64 = "0.22.1"
bitflags = "2.6.0"
clap = { version = "4.5.13", features = [ "derive" ] }
crossterm = { version = "0.27.0", features = [ "event-stream" ] }
dirs = "5.0.1"
futures = "0.3.30"
globset = "0.4.14"
libc = "0.2.155"
md-5 = "0.10.6"
mlua = { version = "0.9.9", features = [ "lua54", "serialize", "macros", "async" ] }
parking_lot = "0.12.3"
ratatui = "0.27.0"
regex = "1.10.6"
scopeguard = "1.2.0"
serde = { version = "1.0.204", features = [ "derive" ] }
serde_json = "1.0.122"
shell-words = "1.1.0"
tokio = { version = "1.39.2", features = [ "full" ] }
tokio-stream = "0.1.15"
tokio-util = "0.7.11"
tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] }
unicode-width = "0.1.13"
24 changes: 11 additions & 13 deletions yazi-adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@ yazi-config = { path = "../yazi-config", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
ansi-to-tui = "=3.1.0"
anyhow = "1.0.86"
arc-swap = "1.7.1"
base64 = "0.22.1"
ansi-to-tui = { workspace = true }
anyhow = { workspace = true }
arc-swap = { workspace = true }
base64 = { workspace = true }
color_quant = "1.1.0"
crossterm = "0.27.0"
futures = "0.3.30"
crossterm = { workspace = true }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use { workspace = true } here because the "use-dev-tty" feature can only be enabled on macOS systems.

Copy link
Contributor Author

@karimElmougi karimElmougi Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. I hadn't realized. I pushed a fix. { workspace = true, features = [ "use-dev-tty" ] } lets the version be defined once in the root Cargo.toml, but with additive features. Details here: https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table

futures = { workspace = true }
image = "0.25.2"
imagesize = "0.13.0"
kamadak-exif = "0.5.5"
ratatui = "0.27.0"
scopeguard = "1.2.0"
tokio = { version = "1.39.2", features = [ "full" ] }

# Logging
tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] }
ratatui = { workspace = true }
scopeguard = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }

[target.'cfg(target_os = "macos")'.dependencies]
crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] }
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
10 changes: 5 additions & 5 deletions yazi-boot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ homepage = "https://yazi-rs.github.io"
repository = "https://github.com/sxyazi/yazi"

[dependencies]
regex = "1.10.5"
regex = { workspace = true }
yazi-adapter = { path = "../yazi-adapter", version = "0.3.0" }
yazi-config = { path = "../yazi-config", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
clap = { version = "4.5.11", features = [ "derive" ] }
serde = { version = "1.0.204", features = [ "derive" ] }
clap = { workspace = true }
serde = { workspace = true }

[build-dependencies]
clap = { version = "4.5.11", features = [ "derive" ] }
clap_complete = "4.5.11"
clap = { workspace = true }
clap_complete = "4.5.12"
clap_complete_fig = "4.5.2"
clap_complete_nushell = "4.5.3"
vergen-gitcl = { version = "1.0.0", features = [ "build" ] }
24 changes: 12 additions & 12 deletions yazi-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ yazi-dds = { path = "../yazi-dds", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
anyhow = "1.0.86"
clap = { version = "4.5.11", features = [ "derive" ] }
crossterm = "0.27.0"
md-5 = "0.10.6"
serde_json = "1.0.121"
tokio = { version = "1.39.2", features = [ "full" ] }
toml_edit = "0.22.18"
anyhow = { workspace = true }
clap = { workspace = true }
crossterm = { workspace = true }
md-5 = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
toml_edit = "0.22.20"

[build-dependencies]
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External build dependencies
anyhow = "1.0.86"
clap = { version = "4.5.11", features = [ "derive" ] }
clap_complete = "4.5.11"
anyhow = { workspace = true }
clap = { workspace = true }
clap_complete = "4.5.12"
clap_complete_fig = "4.5.2"
clap_complete_nushell = "4.5.3"
serde_json = "1.0.121"
serde_json = { workspace = true }
vergen-gitcl = { version = "1.0.0", features = [ "build" ] }

[target.'cfg(target_os = "macos")'.dependencies]
crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] }
crossterm = { workspace = true, features = [ "use-dev-tty" ] }

[[bin]]
name = "ya"
Expand Down
22 changes: 11 additions & 11 deletions yazi-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ repository = "https://github.com/sxyazi/yazi"
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
anyhow = "1.0.86"
arc-swap = "1.7.1"
bitflags = "2.6.0"
crossterm = "0.27.0"
globset = "0.4.14"
indexmap = "2.2.6"
ratatui = "0.27.0"
regex = "1.10.5"
serde = { version = "1.0.204", features = [ "derive" ] }
toml = { version = "0.8.17", features = [ "preserve_order" ] }
anyhow = { workspace = true }
arc-swap = { workspace = true }
bitflags = { workspace = true }
crossterm = { workspace = true }
globset = { workspace = true }
indexmap = "2.3.0"
ratatui = { workspace = true }
regex = { workspace = true }
serde = { workspace = true }
toml = { version = "0.8.19", features = [ "preserve_order" ] }
validator = { version = "0.18.1", features = [ "derive" ] }

[target.'cfg(target_os = "macos")'.dependencies]
crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] }
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
2 changes: 1 addition & 1 deletion yazi-config/preset/yazi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ueberzug_offset = [ 0, 0, 0, 0 ]

[opener]
edit = [
{ run = '${EDITOR:=vi} "$@"', desc = "$EDITOR", block = true, for = "unix" },
{ run = '${EDITOR:-vi} "$@"', desc = "$EDITOR", block = true, for = "unix" },
{ run = 'code %*', orphan = true, desc = "code", for = "windows" },
{ run = 'code -w %*', block = true, desc = "code (block)", for = "windows" },
]
Expand Down
36 changes: 17 additions & 19 deletions yazi-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,25 @@ yazi-scheduler = { path = "../yazi-scheduler", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
anyhow = "1.0.86"
bitflags = "2.6.0"
crossterm = "0.27.0"
dirs = "5.0.1"
futures = "0.3.30"
anyhow = { workspace = true }
bitflags = { workspace = true }
crossterm = { workspace = true }
dirs = { workspace = true }
futures = { workspace = true }
notify = { git = "https://github.com/notify-rs/notify.git", rev = "96dec74316a93bed6eec9db177b233e6e017275e", default-features = false, features = [ "macos_fsevent" ] }
parking_lot = "0.12.3"
ratatui = "0.27.0"
scopeguard = "1.2.0"
serde = "1.0.204"
shell-words = "1.1.0"
tokio = { version = "1.39.2", features = [ "full" ] }
tokio-stream = "0.1.15"
tokio-util = "0.7.11"
unicode-width = "0.1.13"

# Logging
tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] }
parking_lot = { workspace = true }
ratatui = { workspace = true }
scopeguard = { workspace = true }
serde = { workspace = true }
shell-words = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tokio-util = { workspace = true }
tracing = { workspace = true }
unicode-width = { workspace = true }

[target."cfg(unix)".dependencies]
libc = "0.2.155"
libc = { workspace = true }

[target.'cfg(target_os = "macos")'.dependencies]
crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] }
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
20 changes: 9 additions & 11 deletions yazi-dds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ yazi-boot = { path = "../yazi-boot", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
anyhow = "1.0.86"
mlua = { version = "0.9.9", features = [ "lua54" ] }
parking_lot = "0.12.3"
serde = { version = "1.0.204", features = [ "derive" ] }
serde_json = "1.0.121"
tokio = { version = "1.39.2", features = [ "full" ] }
tokio-stream = "0.1.15"
tokio-util = "0.7.11"

# Logging
tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] }
anyhow = { workspace = true }
mlua = { workspace = true }
parking_lot = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tokio-util = { workspace = true }
tracing = { workspace = true }

[build-dependencies]
vergen-gitcl = { version = "1.0.0", features = [ "build" ] }
Expand Down
22 changes: 11 additions & 11 deletions yazi-fm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@ yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
anyhow = "1.0.86"
anyhow = { workspace = true }
better-panic = "0.3.0"
crossterm = { version = "0.27.0", features = [ "event-stream" ] }
crossterm = { workspace = true }
fdlimit = "0.3.0"
futures = "0.3.30"
mlua = { version = "0.9.9", features = [ "lua54" ] }
ratatui = "0.27.0"
scopeguard = "1.2.0"
futures = { workspace = true }
mlua = { workspace = true }
ratatui = { workspace = true }
scopeguard = { workspace = true }
syntect = { version = "5.2.0", default-features = false, features = [ "parsing", "plist-load", "regex-onig" ] }
tokio = { version = "1.39.2", features = [ "full" ] }
tokio-stream = "0.1.15"
tokio = { workspace = true }
tokio-stream = { workspace = true }

# Logging
tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] }
tracing = { workspace = true }
tracing-appender = "0.2.3"
tracing-subscriber = "0.3.18"

[target."cfg(unix)".dependencies]
libc = "0.2.155"
libc = { workspace = true }
signal-hook-tokio = { version = "0.3.1", features = [ "futures-v0_3" ] }

[target.'cfg(target_os = "macos")'.dependencies]
crossterm = { version = "0.27.0", features = [ "event-stream", "use-dev-tty" ] }
crossterm = { workspace = true, features = [ "use-dev-tty" ] }

[target.'cfg(all(not(target_os = "macos"), not(target_os = "windows")))'.dependencies]
tikv-jemallocator = "0.6.0"
Expand Down
10 changes: 5 additions & 5 deletions yazi-fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
anyhow = "1.0.86"
futures = "0.3.30"
ratatui = "0.27.0"
regex = "1.10.5"
tokio = { version = "1.39.2", features = [ "full" ] }
anyhow = { workspace = true }
futures = { workspace = true }
ratatui = { workspace = true }
regex = { workspace = true }
tokio = { workspace = true }
36 changes: 17 additions & 19 deletions yazi-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,30 @@ yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
ansi-to-tui = "=3.1.0"
anyhow = "1.0.86"
base64 = "0.22.1"
crossterm = "0.27.0"
futures = "0.3.30"
globset = "0.4.14"
md-5 = "0.10.6"
mlua = { version = "0.9.9", features = [ "lua54", "serialize", "macros", "async" ] }
parking_lot = "0.12.3"
ratatui = "0.27.0"
shell-words = "1.1.0"
ansi-to-tui = { workspace = true }
anyhow = { workspace = true }
base64 = { workspace = true }
crossterm = { workspace = true }
futures = { workspace = true }
globset = { workspace = true }
md-5 = { workspace = true }
mlua = { workspace = true }
parking_lot = { workspace = true }
ratatui = { workspace = true }
shell-words = { workspace = true }
syntect = { version = "5.2.0", default-features = false, features = [ "parsing", "plist-load", "regex-onig" ] }
tokio = { version = "1.39.2", features = [ "full" ] }
tokio-stream = "0.1.15"
tokio-util = "0.7.11"
unicode-width = "0.1.13"
tokio = { workspace = true }
tokio-stream = { workspace = true }
tokio-util = { workspace = true }
tracing = { workspace = true }
unicode-width = { workspace = true }
yazi-prebuild = "0.1.2"

# Logging
tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] }

[target."cfg(unix)".dependencies]
uzers = "0.12.0"

[target."cfg(windows)".dependencies]
clipboard-win = "5.4.0"

[target.'cfg(target_os = "macos")'.dependencies]
crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] }
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
6 changes: 3 additions & 3 deletions yazi-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ yazi-config = { path = "../yazi-config", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
anyhow = "1.0.86"
mlua = { version = "0.9.9", features = [ "lua54" ] }
tokio = { version = "1.39.2", features = [ "full" ] }
anyhow = { workspace = true }
mlua = { workspace = true }
tokio = { workspace = true }
16 changes: 7 additions & 9 deletions yazi-scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@ yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" }
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }

# External dependencies
anyhow = "1.0.86"
anyhow = { workspace = true }
async-priority-channel = "0.2.0"
futures = "0.3.30"
parking_lot = "0.12.3"
scopeguard = "1.2.0"
tokio = { version = "1.39.2", features = [ "full" ] }

# Logging
tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] }
futures = { workspace = true }
parking_lot = { workspace = true }
scopeguard = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }

[target."cfg(unix)".dependencies]
libc = "0.2.155"
libc = { workspace = true }

[target.'cfg(not(target_os = "android"))'.dependencies]
trash = "5.0.0"
Loading