Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mgeisler opened this issue Dec 11, 2023 · 4 comments · Fixed by #538
Closed

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

mgeisler opened this issue Dec 11, 2023 · 4 comments · Fixed by #538

Comments

@mgeisler
Copy link
Contributor

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.

@mgeisler mgeisler changed the title Licenses: "Apache 2.0 _and_ MIT", or "Apache 2.0 _or_ MIT" Licenses: "Apache 2.0 and MIT", or "Apache 2.0 or MIT" Dec 11, 2023
@asomers
Copy link
Owner

asomers commented Dec 11, 2023

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
Copy link
Contributor Author

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 added a commit that referenced this issue Dec 21, 2023
Clarify that Mockall may be distributed under the terms of either the
MIT or Apache-2.0 license.  This was always the intent, but was never
expressed using the recommended SPDX syntax.

Fixes #529
@asomers
Copy link
Owner

asomers commented Dec 21, 2023

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

@mgeisler
Copy link
Contributor Author

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

Certainly, it looks good from what I can tell!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants