Description
Getting this error in #90842:
tidy error: invalid license `MIT/Apache-2.0 AND BSD-2-Clause` in `crossbeam-queue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)`
I think this is a bug in tidy.
In
src/tools/tidy/src/deps.rs
EXCEPTIONS
, there is already an exception forcrossbeam-queue
. However, exceptions are not allowed for the runtime crates that make up the standard library.With the
backtrace
feature,std
depends onobject
. Thenobject
has a conditional dependency onindexmap
, but this is not enabled understd
. However, if you look at the whole workspace metadata at once (as tidy does), then the compiler enables theobject
features that requireindexmap
, and now also theindexmap
feature forrustc-rayon
too.So tidy sees
std
->object
->indexmap
->rustc-rayon
->rustc-rayon-core
->crossbeam-queue
in the metadata, and thus includes all of that in "runtime" crates, and then the exception isn't allowed. But if you look atcargo tree --all-features -p std
, they aren't really included at all.
Originally posted by @cuviper in #90842 (comment)