Skip to content

Commit 4b9675f

Browse files
Update license check post-cargo update
1 parent 342d956 commit 4b9675f

File tree

1 file changed

+27
-18
lines changed

1 file changed

+27
-18
lines changed

src/tools/tidy/src/deps.rs

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ const LICENSES: &[&str] = &[
2525
/// tooling. It is _crucial_ that no exception crates be dependencies
2626
/// of the Rust runtime (std/test).
2727
const EXCEPTIONS: &[(&str, &str)] = &[
28-
("mdbook", "MPL-2.0"), // mdbook
29-
("openssl", "Apache-2.0"), // cargo, mdbook
30-
("rdrand", "ISC"), // mdbook, rustfmt
31-
("fuchsia-cprng", "BSD-3-Clause"), // mdbook, rustfmt
32-
("fuchsia-zircon-sys", "BSD-3-Clause"), // rustdoc, rustc, cargo
33-
("fuchsia-zircon", "BSD-3-Clause"), // rustdoc, rustc, cargo (jobserver & tempdir)
34-
("colored", "MPL-2.0"), // rustfmt
35-
("ordslice", "Apache-2.0"), // rls
36-
("cloudabi", "BSD-2-Clause"), // (rls -> crossbeam-channel 0.2 -> rand 0.5)
37-
("ryu", "Apache-2.0 OR BSL-1.0"), // rls/cargo/... (because of serde)
38-
("bytesize", "Apache-2.0"), // cargo
39-
("im-rc", "MPL-2.0+"), // cargo
40-
("constant_time_eq", "CC0-1.0"), // rustfmt
41-
("sized-chunks", "MPL-2.0+"), // cargo via im-rc
42-
("bitmaps", "MPL-2.0+"), // cargo via im-rc
28+
("mdbook", "MPL-2.0"), // mdbook
29+
("openssl", "Apache-2.0"), // cargo, mdbook
30+
("fuchsia-zircon-sys", "BSD-3-Clause"), // rustdoc, rustc, cargo
31+
("fuchsia-zircon", "BSD-3-Clause"), // rustdoc, rustc, cargo (jobserver & tempdir)
32+
("colored", "MPL-2.0"), // rustfmt
33+
("ordslice", "Apache-2.0"), // rls
34+
("cloudabi", "BSD-2-Clause"), // (rls -> crossbeam-channel 0.2 -> rand 0.5)
35+
("ryu", "Apache-2.0 OR BSL-1.0"), // rls/cargo/... (because of serde)
36+
("bytesize", "Apache-2.0"), // cargo
37+
("im-rc", "MPL-2.0+"), // cargo
38+
("constant_time_eq", "CC0-1.0"), // rustfmt
39+
("sized-chunks", "MPL-2.0+"), // cargo via im-rc
40+
("bitmaps", "MPL-2.0+"), // cargo via im-rc
41+
("crossbeam-queue", "MIT/Apache-2.0 AND BSD-2-Clause"), // rls via rayon
42+
("arrayref", "BSD-2-Clause"), // cargo-miri/directories/.../rust-argon2 (redox)
43+
("instant", "BSD-3-Clause"), // rustc_driver/tracing-subscriber/parking_lot
4344
// FIXME: this dependency violates the documentation comment above:
4445
("fortanix-sgx-abi", "MPL-2.0"), // libstd but only for `sgx` target
45-
("crossbeam-channel", "MIT/Apache-2.0 AND BSD-2-Clause"), // cargo
4646
];
4747

4848
/// These are the root crates that are part of the runtime. The licenses for
@@ -69,8 +69,8 @@ const PERMITTED_DEPENDENCIES: &[&str] = &[
6969
"bitflags",
7070
"block-buffer",
7171
"block-padding",
72-
"byte-tools",
7372
"byteorder",
73+
"byte-tools",
7474
"cc",
7575
"cfg-if",
7676
"chalk-derive",
@@ -103,6 +103,7 @@ const PERMITTED_DEPENDENCIES: &[&str] = &[
103103
"hermit-abi",
104104
"humantime",
105105
"indexmap",
106+
"instant",
106107
"itertools",
107108
"jobserver",
108109
"kernel32-sys",
@@ -112,13 +113,13 @@ const PERMITTED_DEPENDENCIES: &[&str] = &[
112113
"lock_api",
113114
"log",
114115
"log_settings",
116+
"maybe-uninit",
115117
"md-5",
116118
"measureme",
117119
"memchr",
118120
"memmap",
119121
"memoffset",
120122
"miniz_oxide",
121-
"nodrop",
122123
"num_cpus",
123124
"object",
124125
"once_cell",
@@ -233,6 +234,14 @@ fn check_exceptions(metadata: &Metadata, bad: &mut bool) {
233234
}
234235
Some(pkg_license) => {
235236
if pkg_license.as_str() != *license {
237+
if *name == "crossbeam-queue"
238+
&& *license == "MIT/Apache-2.0 AND BSD-2-Clause"
239+
{
240+
// We have two versions of crossbeam-queue and both
241+
// are fine.
242+
continue;
243+
}
244+
236245
println!("dependency exception `{}` license has changed", name);
237246
println!(" previously `{}` now `{}`", license, pkg_license);
238247
println!(" update EXCEPTIONS for the new license");

0 commit comments

Comments
 (0)