Skip to content

Commit

Permalink
simplify version cascading by using workspaces (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp authored Nov 20, 2024
1 parent b41861c commit fe8037a
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 14 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ jobs:
toolchain: nightly-2023-12-30
components: rustfmt

- name: Check workspace versions match
run: |
cargo metadata --format-version=1 --no-deps |
jq -e -r '.packages[] | "\(.name) \(.version)"' |
sort | xargs -l bash -c \
'grep "$0 = { version = \"$1\"" -q Cargo.toml && printf "version %-7s %-27s $0\n" $1 "matches package" || printf "version %-7s is not reflected on package $0\n" "$1" | false';
if [ $? -eq 0 ]; then exit 0; else exit 1; fi
- name: Cargo fmt
run: |
cargo fmt -- --check
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,20 @@ members = [
"livekit-api",
"livekit-protocol",
"livekit-ffi",
"livekit-runtime",
"libwebrtc",
"soxr-sys",
"webrtc-sys",
"webrtc-sys/build",
]

[workspace.dependencies]
libwebrtc = { version = "0.3.7", path = "libwebrtc" }
livekit-api = { version = "0.4.1", path = "livekit-api" }
livekit-ffi = { version = "0.12.2", path = "livekit-ffi" }
livekit-protocol = { version = "0.3.6", path = "livekit-protocol" }
livekit-runtime = { version = "0.3.1", path = "livekit-runtime" }
livekit = { version = "0.7.0", path = "livekit" }
soxr-sys = { version = "0.1.0", path = "soxr-sys" }
webrtc-sys-build = { version = "0.3.5", path = "webrtc-sys/build" }
webrtc-sys = { version = "0.3.5", path = "webrtc-sys" }
2 changes: 1 addition & 1 deletion libwebrtc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Livekit safe bindings to libwebrtc"
repository = "https://github.com/livekit/rust-sdks"

[dependencies]
livekit-protocol = { path = "../livekit-protocol", version = "0.3.5" }
livekit-protocol = { workspace = true }
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion livekit-api/.nanparc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version 0.4.0
version 0.4.1
language rust
2 changes: 1 addition & 1 deletion livekit-ffi/.nanparc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version 0.10.2
version 0.12.2
language rust
4 changes: 2 additions & 2 deletions livekit-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ __rustls-tls = ["livekit/__rustls-tls"]
tracing = ["tokio/tracing", "console-subscriber"]

[dependencies]
livekit = { path = "../livekit", version = "0.7.0" }
livekit = { workspace = true }
soxr-sys = { path = "../soxr-sys" }
livekit-protocol = { path = "../livekit-protocol", version = "0.3.6" }
livekit-protocol = { workspace = true }
tokio = { version = "1", features = ["full", "parking_lot"] }
futures-util = { version = "0.3", default-features = false, features = ["sink"] }
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
Expand Down
2 changes: 1 addition & 1 deletion livekit-protocol/.nanparc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version 0.3.5
version 0.3.6
language rust
2 changes: 1 addition & 1 deletion livekit-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "Livekit protocol and utilities for the Rust SDK"
repository = "https://github.com/livekit/rust-sdks"

[dependencies]
livekit-runtime = { path = "../livekit-runtime", version = "0.3.1" }
livekit-runtime = { workspace = true }
tokio = { version = "1", default-features = false, features = [
"sync",
"macros",
Expand Down
2 changes: 1 addition & 1 deletion livekit-runtime/.nanparc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version 0.3.0
version 0.3.1
language rust
2 changes: 1 addition & 1 deletion livekit/.nanparc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version 0.6.0
version 0.7.0
language rust
8 changes: 4 additions & 4 deletions livekit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ __rustls-tls = ["livekit-api/__rustls-tls"]
__lk-internal = []

[dependencies]
livekit-runtime = { path = "../livekit-runtime", version = "0.3.1", default-features = false }
livekit-api = { path = "../livekit-api", version = "0.4.1", default-features = false }
libwebrtc = { path = "../libwebrtc", version = "0.3.7" }
livekit-protocol = { path = "../livekit-protocol", version = "0.3.6" }
livekit-runtime = { workspace = true, default-features = false }
livekit-api = { workspace = true, default-features = false }
libwebrtc = { workspace = true }
livekit-protocol = { workspace = true }
prost = "0.12"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion webrtc-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cxx = "1.0"
log = "0.4"

[build-dependencies]
webrtc-sys-build = { version = "0.3.5", path = "./build" }
webrtc-sys-build = { workspace = true }
cxx-build = "1.0"
glob = "0.3"
cc = "1.0"
Expand Down

0 comments on commit fe8037a

Please sign in to comment.