Skip to content

Replace the spdx-rs dependency with a minimal in-tree SPDX tag-value parser#154823

Open
jakubadamw wants to merge 1 commit intorust-lang:mainfrom
jakubadamw:spdx-rs-replacement
Open

Replace the spdx-rs dependency with a minimal in-tree SPDX tag-value parser#154823
jakubadamw wants to merge 1 commit intorust-lang:mainfrom
jakubadamw:spdx-rs-replacement

Conversation

@jakubadamw
Copy link
Copy Markdown
Contributor

The spdx-rs crate is no longer maintained and is behind on its own dependency updates. It is currently used in the collect-license-metadata, which currently uses a single function therefrom: spdx_rs::parsers::spdx_from_tag_value, which parses the output of the reuse tool to extract file names, licences and copyright text.

This PR replaces the use of said function with a small minimal parser that handles just the subset of the SPDX tag-value format that is needed: Tag: Value line pairs and multi-line <text>...</text> blocks.

Coincidentally, this gets rid of the last transitive dependency on syn v1.

…parser

The spdx-rs crate is no longer maintained and is behind on its own dependency
updates. The only function that collect-license-metadata uses from it is
`spdx_rs::parsers::spdx_from_tag_value`, which parses the output of the `reuse`
tool to extract file names, licences and copyright text.

Replace this with a small minimal parser that handles just the subset
of the SPDX tag-value format that is needed: `Tag: Value` line pairs
and multi-line `<text>...</text>` blocks.

Coincidentally, this gets rid of the last transitive dependency on syn v1.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 4, 2026

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 4, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 4, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Mark-Simulacrum

@cyrgani cyrgani linked an issue Apr 5, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking issue for syn 2.0 inside rust-lang/rust

3 participants