Skip to content

Conversation

dimbleby
Copy link
Contributor

Per https://doc.rust-lang.org/cargo/reference/manifest.html#slash

Previously multiple licenses could be separated with a /, but that usage is deprecated.

pretty sure from the README that your intention is OR rather than AND, I guess this form makes that clear

@alexcrichton
Copy link
Member

Thanks for the report, but / is used by quite a few crates so I don't think it makes sense to change it here in just this one crate. IIRC basically everything I published for a year or so used / and I think this may be one of the first that has had a request to change.

@dimbleby
Copy link
Contributor Author

What's the downside? isn't the un-deprecated form just better?

We have tooling that parses licenses using spdx. That crate is happy with "MIT OR Apache-2.0" but not with "MIT/Apache-2.0": so that's my motivation. Every now and then I go and submit a handful of MRs to projects that I've encountered using a string for which the parse fails.

@dimbleby
Copy link
Contributor Author

(in fact as it goes rust-lang/socket2#288 looks like one where the / originated with you, so this isn't quite the first to have had a request to change...)

@atouchet
Copy link
Contributor

There are a couple of other license fields in this repo with this outdated formatting as well:

license = "MIT/Apache-2.0"

license = "MIT/Apache-2.0"

@dimbleby
Copy link
Contributor Author

Thanks. Not sure whether the hint was that this would be more likely to be merged if I fixed all three files; but I've updated the MR so that it does that.

@joshtriplett
Copy link
Member

@dimbleby There are many, many crates out there that uses / instead of OR. Any tool parsing SPDX license fields should likely handle / for compatibility.

I'm going to go ahead and merge this, but I would still recommend that whatever tool you're using needs to handle /.

@joshtriplett joshtriplett merged commit 71a2466 into rust-lang:master Apr 27, 2022
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 this pull request may close these issues.

4 participants