Skip to content

Commit

Permalink
Auto merge of #13292 - dtolnay-contrib:parentheses, r=weihanglo
Browse files Browse the repository at this point in the history
Delete sentence about parentheses being unsupported in license

Parentheses have been supported by crates.io since 2 years ago.

- rust-lang/crates.io#4257

Their functionality is tested by this test: https://github.com/rust-lang/crates.io/blob/3acd63c1f3625d83322e4819d76296ae5ef291c5/tests/utils/license-test.js#L68-L79.

I think a separate test in Cargo is most likely not valuable because Cargo does not parse these license strings, they are just treated as `Option<String>`.

Here is an example of an extremely widely used package (147 million downloads) with parentheses in its license: https://crates.io/crates/unicode-ident.
  • Loading branch information
bors committed Jan 14, 2024
2 parents d530b46 + c78b2ca commit 9d3473c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/src/reference/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ containing the text of the license (relative to this `Cargo.toml`).

[crates.io] interprets the `license` field as an [SPDX 2.3 license
expression][spdx-2.3-license-expressions]. The name must be a known license
from the [SPDX license list 3.20][spdx-license-list-3.20]. Parentheses are not
currently supported. See the [SPDX site] for more information.
from the [SPDX license list 3.20][spdx-license-list-3.20]. See the [SPDX site]
for more information.

SPDX license expressions support AND and OR operators to combine multiple
licenses.[^slash]
Expand Down

0 comments on commit 9d3473c

Please sign in to comment.