Skip to content

tidy license check error for crossbeam-queue #92677

Closed
@pierwill

Description

@pierwill

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 for crossbeam-queue. However, exceptions are not allowed for the runtime crates that make up the standard library.

With the backtrace feature, std depends on object. Then object has a conditional dependency on indexmap, but this is not enabled under std. However, if you look at the whole workspace metadata at once (as tidy does), then the compiler enables the object features that require indexmap, and now also the indexmap feature for rustc-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 at cargo tree --all-features -p std, they aren't really included at all.

Originally posted by @cuviper in #90842 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions