asomers / mockall

A powerful mock object library for Rust
Apache License 2.0
1.5k stars 62 forks source link

Licenses: "Apache 2.0 and MIT", or "Apache 2.0 or MIT" #529

Closed mgeisler closed 10 months ago

mgeisler commented 10 months ago

Hi @asomers,

I'm working on importing mockall and mockall_derive to AOSP. Our tooling flagged the license file: is the crate licensed under "Apache 2.0 or MIT" (as is usual in Rust), or is it licensed with both licenses applying at the same time?

The license field in Cargo.toml currently says

[package]
license = "MIT/Apache-2.0"

and I believe it might have been intended to let it say

[package]
license = "MIT OR Apache-2.0"

as per the Cargo reference.

We pick the Apache 2.0 license when given the choice (random example), but here our tooling got confused.

asomers commented 10 months ago

Good question. I'm sure I just copied it from some place. A quick grep of my checked out Rust projects shows 60 that use "MIT/Apache-2.0", including one that's within rust-lang/rust itself. Is there any official guidance on this issue?

mgeisler commented 10 months ago

Is there any official guidance on this issue?

Not sure, I don't know more than what the Cargo book says.

Looking around the SPDX site, I found this page which shows the OR syntax also shown in the Cargo reference.

It turns out that this is not blocking the import so it's probably not a big deal.

asomers commented 10 months ago

Thanks for that reference, @mgeisler. Would you please review the linked PR?

mgeisler commented 10 months ago

Thanks for that reference, @mgeisler. Would you please review the linked PR?

Certainly, it looks good from what I can tell!