diff --git a/Justfile b/Justfile index 3aec3cc..e86c140 100644 --- a/Justfile +++ b/Justfile @@ -15,17 +15,21 @@ fmt-check: fmt: cargo fmt --all -# Clippy, warnings denied. +# Clippy, warnings denied. `--all-features` matters: every subtitle +# translation backend sits behind a default-off cargo feature, so without it +# the gate never compiles a line of them (#191, #192). lint: - cargo clippy --all-targets -- -D warnings + cargo clippy --all-targets --all-features -- -D warnings # Unused workspace dependencies. Stable toolchain, unlike cargo-udeps. deps: cargo machete -# Unit and integration tests, excluding the e2e crate. +# Unit and integration tests, excluding the e2e crate. `--all-features` for +# the same reason `lint` needs it: the translation backends are feature-gated +# and would otherwise never run. test: - cargo nextest run --workspace --exclude arr-e2e + cargo nextest run --workspace --exclude arr-e2e --all-features # End-to-end tests. Needs a Transmission container (`just e2e-up`); not part # of the push gate. Never point this at the production Transmission LXC. diff --git a/crates/arr-subs/src/lib.rs b/crates/arr-subs/src/lib.rs index 3de9467..4518d32 100644 --- a/crates/arr-subs/src/lib.rs +++ b/crates/arr-subs/src/lib.rs @@ -26,15 +26,9 @@ pub mod convert; pub mod decode; #[cfg(feature = "translate-deepl")] pub mod deepl; +pub mod error; #[cfg(feature = "translate-google")] pub mod google; -// `unused_crate_dependencies` is a per-target lint; `wiremock` is only used -// from the `tests/podnapisi.rs` integration target, not from this library -// target's own `#[cfg(test)]` module. -#[cfg(test)] -use wiremock as _; - -pub mod error; pub mod model; #[cfg(feature = "translate-openai")] pub mod openai; @@ -60,9 +54,9 @@ pub use srt::Cue; pub use sync::{Outcome, Rejection, Syncer, DEFAULT_BINARY as ALASS_DEFAULT_BINARY}; pub use translate::{Backend, BackendId, Batch, BatchCue, TranslateFuture, TranslatedCue}; -// The OpenSubtitles provider's HTTP paths are exercised by the integration -// tests, which link this crate; the unit-test target still has to satisfy -// the unused-crate-dependencies lint for the dev-dependency itself. +// `unused_crate_dependencies` is a per-target lint. Every provider and +// backend exercises its HTTP paths from an integration target under `tests/`, +// so this library target never uses `wiremock` itself and has to say so. #[cfg(test)] use wiremock as _;