Bug#1144912: rust-swc-core: FTBFS: wrong [[test]] name in swc_css_prefixer/Cargo.toml (expects tests/fixture.rs, actual file is tests/prefixer.rs)

Juan Manuel Méndez Rey <[email protected]>
Newsgroups gmane.linux.debian.devel.bugs.rc
Message-ID <4576f1bf0d9607ecbb7c9737ba7d0621__27625.9893247456$1787228123$gmane$org@proton.me>
Package: rust-swc-core
Version: 65.0.4+ds-4
Severity: serious
Justification: fails to build from source
X-Debbugs-Cc: [email protected]

65.0.4+ds-4 FTBFS on all architectures (confirmed via buildd.debian.org,
attempted 2026-08-20, arch 'all'):

  error: failed to parse manifest at
  `/build/reproducible-path/rust-swc-core-65.0.4+ds/crates/swc_css_prefixer/Cargo.toml`

  Caused by:
    can't find `fixture` test at `tests/fixture.rs` or
    `tests/fixture/main.rs`. Please specify test.path if you want to use a
    non-default path.
  dh_auto_test: error: /usr/share/dh-rust/bin/cargo test returned exit code 101

Root cause: debian/patches/2005_avoid_crate_testing.patch adds this stanza to
crates/swc_css_prefixer/Cargo.toml:

  [[test]]
  name = "fixture"
  required-features = ["testing"]

but swc_css_prefixer's actual test file is tests/prefixer.rs, not
tests/fixture.rs (the crate ships no tests/fixture.rs or tests/fixture/
directory containing main.rs). Cargo therefore fails to even parse the
manifest, which aborts the whole `cargo test` invocation for the workspace
and fails binary-indep for the entire source package, not just this crate.

The fix looks like a one-line name mismatch — the intent (matching the same
pattern applied to the other crates in that patch) was presumably to gate the
crate's existing auto-discovered test behind the "testing" feature. Since
cargo auto-discovers tests/*.rs and names the target after the file stem, the
stanza should read:

  [[test]]
  name = "prefixer"
  required-features = ["testing"]

(or alternatively keep name = "fixture" but add an explicit
`path = "tests/prefixer.rs"`).

Full build log:
https://buildd.debian.org/status/fetch.php?pkg=rust-swc-core&arch=all&ver=65.0.4%2Bds-4&stamp=1786554841&raw=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.