CI: check dependency licences with cargo-deny #594

Open
Kaairim wants to merge 1 commit from upstream-pr/599 into main
Kaairim commented 2026-11-24 02:19:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kaairim on 2026-11-24T02:19:33Z.


CONTRIBUTING.md asks for GPL-2.0-compatible dependencies, but nothing checks it. This adds deny.toml and a CI job (EmbarkStudios/cargo-deny-action@v2, check licenses sources) on ubuntu – it reads Cargo.lock and crate metadata and builds nothing.

The allow list is THIRD_PARTY.md's "When adding dependencies" list (MIT, BSD, Zlib, ISC, Unlicense, LGPL-2.1, GPL-2.0, MPL-2.0) plus Unicode-3.0, which unicode-ident needs today (THIRD_PARTY.md's crate line does not name it yet). Apache-2.0 alone is not allowed; "MIT OR Apache-2.0" passes through MIT. Sources: crates.io only.

What is in it

  • deny.toml
  • .github/workflows/ci.yml: a licences job next to the Windows build

Tested

  • Windows 11 (26300). I looked up the licence of every package in Cargo.lock on crates.io (64 packages): each has an allowed licence or an allowed alternative (retour is BSD-2-Clause, unicode-ident is (MIT OR Apache-2.0) AND Unicode-3.0)
  • cargo-deny was not run locally (no Rust toolchain on this machine); the job's first run on this PR is the real check

Not tested

  • cargo-deny itself, see above

AI use

  • Claude Code with Claude Opus 5.5: found the gap while analysing the repository, wrote the change and this description; a second Claude Opus 5.5 agent reviewed the diff. I read every line.

Improvements by William "kaairim" Deivid (wdcore).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5464842752 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/599). Originally posted by [Kaairim](https://github.com/Kaairim) on 2026-11-24T02:19:33Z. --- CONTRIBUTING.md asks for GPL-2.0-compatible dependencies, but nothing checks it. This adds `deny.toml` and a CI job (`EmbarkStudios/cargo-deny-action@v2`, `check licenses sources`) on ubuntu – it reads Cargo.lock and crate metadata and builds nothing. The allow list is THIRD_PARTY.md's "When adding dependencies" list (MIT, BSD, Zlib, ISC, Unlicense, LGPL-2.1, GPL-2.0, MPL-2.0) plus Unicode-3.0, which unicode-ident needs today (THIRD_PARTY.md's crate line does not name it yet). Apache-2.0 alone is not allowed; "MIT OR Apache-2.0" passes through MIT. Sources: crates.io only. **What is in it** - `deny.toml` - `.github/workflows/ci.yml`: a `licences` job next to the Windows build **Tested** - Windows 11 (26300). I looked up the licence of every package in Cargo.lock on crates.io (64 packages): each has an allowed licence or an allowed alternative (`retour` is BSD-2-Clause, `unicode-ident` is (MIT OR Apache-2.0) AND Unicode-3.0) - cargo-deny was **not** run locally (no Rust toolchain on this machine); the job's first run on this PR is the real check **Not tested** - cargo-deny itself, see above **AI use** - Claude Code with Claude Opus 5.5: found the gap while analysing the repository, wrote the change and this description; a second Claude Opus 5.5 agent reviewed the diff. I read every line. Improvements by William "kaairim" Deivid (wdcore). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
throny commented 2026-11-24 21:09:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-24T20:15:40Z.


Two contributors checked independently and found that #276 solves the same problem (for #265) in a different way: #1607, group D37. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7143266183 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/599#issuecomment-7143266183). Originally posted by [throny](https://github.com/throny) on 2026-11-24T20:15:40Z. --- <!-- xcl-1607-hint:D37 --> Two contributors checked independently and found that #276 solves the same problem (for #265) in a different way: #1607, group D37. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
DavidM1911 commented 2026-11-25 14:09:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:06:49Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7163308820 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/599#issuecomment-7163308820). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T13:06:49Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
github-actions[bot] commented 2026-11-29 20:43:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:43:51Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262312565 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/599#issuecomment-7262312565). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:43:51Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 03:47:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:47:33Z.


Triage (#1607) – head 15f150b

Overlaps #276, which also adds deny.toml and a cargo-deny job in ci.yml; #276 additionally checks bans and runs RustSec advisories on a schedule, while this PR keeps a policy allow-list (the THIRD_PARTY.md list) instead of an inventory of the licences in use. That is a different choice, not the same change.
Problem in the diff: deny.toml and the ci.yml comment say XCL is GPL-2.0-only and allow only GPL-2.0-compatible licences. Main was relicensed to GPL-3.0-or-later (06f90c19, #3002): the workspace crates now declare GPL-3.0-or-later, which is not in [licenses] allow, so cargo deny check licenses would fail on main after a rebase, and Apache-2.0 / LGPL-3.0 / GPL-3.0 (allowed by THIRD_PARTY.md now) would be refused. The allow-list needs updating to the current THIRD_PARTY.md policy.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300067487 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/599#issuecomment-7300067487). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:47:33Z. --- **Triage (#1607)** – head 15f150b Overlaps #276, which also adds deny.toml and a cargo-deny job in ci.yml; #276 additionally checks bans and runs RustSec advisories on a schedule, while this PR keeps a policy allow-list (the THIRD_PARTY.md list) instead of an inventory of the licences in use. That is a different choice, not the same change. Problem in the diff: deny.toml and the ci.yml comment say XCL is GPL-2.0-only and allow only GPL-2.0-compatible licences. Main was relicensed to GPL-3.0-or-later (06f90c19, #3002): the workspace crates now declare `GPL-3.0-or-later`, which is not in `[licenses] allow`, so `cargo deny check licenses` would fail on main after a rebase, and Apache-2.0 / LGPL-3.0 / GPL-3.0 (allowed by THIRD_PARTY.md now) would be refused. The allow-list needs updating to the current THIRD_PARTY.md policy. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/599:upstream-pr/599'
git switch 'upstream-pr/599'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/599'
git switch 'upstream-pr/599'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/599'
git switch 'upstream-pr/599'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/599'
git switch 'main'
git merge --squash 'upstream-pr/599'
git switch 'main'
git merge --ff-only 'upstream-pr/599'
git switch 'main'
git merge 'upstream-pr/599'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!594
No description provided.