Simplify livekit config so that cargo check Just Works (#21661)

Supersedes https://github.com/zed-industries/zed/pull/21653

This enables us to use `cargo test -p workspace` on macOS and Linux.

Note that the line diffs in `shared_screen.rs` are spurious, I just
re-ordered the `macos` and `cross-platform` modules to match the order
in the call crate.

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-12-06 13:50:59 -08:00 committed by GitHub
parent 7d80d1208c
commit de939e718a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 345 additions and 327 deletions

View file

@ -21,8 +21,6 @@ test-support = [
"project/test-support",
"util/test-support"
]
livekit-macos = ["livekit_client_macos"]
livekit-cross-platform = ["livekit_client"]
[dependencies]
anyhow.workspace = true
@ -42,8 +40,12 @@ serde.workspace = true
serde_derive.workspace = true
settings.workspace = true
util.workspace = true
livekit_client_macos = { workspace = true, optional = true }
livekit_client = { workspace = true, optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
livekit_client_macos = { workspace = true }
[target.'cfg(not(target_os = "macos"))'.dependencies]
livekit_client = { workspace = true }
[dev-dependencies]
client = { workspace = true, features = ["test-support"] }

View file

@ -1,41 +1,13 @@
pub mod call_settings;
#[cfg(any(
all(target_os = "macos", feature = "livekit-macos"),
all(
not(target_os = "macos"),
feature = "livekit-macos",
not(feature = "livekit-cross-platform")
)
))]
#[cfg(target_os = "macos")]
mod macos;
#[cfg(any(
all(target_os = "macos", feature = "livekit-macos"),
all(
not(target_os = "macos"),
feature = "livekit-macos",
not(feature = "livekit-cross-platform")
)
))]
#[cfg(target_os = "macos")]
pub use macos::*;
#[cfg(any(
all(
target_os = "macos",
feature = "livekit-cross-platform",
not(feature = "livekit-macos"),
),
all(not(target_os = "macos"), feature = "livekit-cross-platform"),
))]
#[cfg(not(target_os = "macos"))]
mod cross_platform;
#[cfg(any(
all(
target_os = "macos",
feature = "livekit-cross-platform",
not(feature = "livekit-macos"),
),
all(not(target_os = "macos"), feature = "livekit-cross-platform"),
))]
#[cfg(not(target_os = "macos"))]
pub use cross_platform::*;