Skip to content

fix: ship LICENSE-MIT, LICENSE-APACHE and NOTICE.md in every published crate - #88

Merged
Ttimmahlax merged 1 commit into
mainfrom
fix/ship-license-files
Nov 20, 2026
Merged

Ttimmahlax merged 1 commit into
mainfrom
fix/ship-license-files

Conversation

@Ttimmahlax

Copy link
Copy Markdown
Contributor

Problem

The workspace declares license = "MIT OR Apache-2.0" for all ten published crates, but none of their packages contains a licence text. cargo package --list on main (0.10.4), for each of rusty_xml, rusty_xml-parser, -tree, -sax, -reader, -writer, -xpath, -valid, -cli, -alloc:

.cargo_vcs_info.json
CHANGELOG.md
Cargo.lock
Cargo.toml
Cargo.toml.orig
(README.md, rusty_xml only)
src/...

LICENSE-MIT, LICENSE-APACHE and NOTICE.md exist only at the workspace root. Cargo packages a crate's own directory and cannot pull in files from outside it, so the published tarballs have been shipping without them. (rusty_xml-c-abi and rusty_xml-bench are publish = false and are not affected.)

Fix

  • Copy the root LICENSE-MIT (MIT, "Copyright (c) 2026 Mata Network"), LICENSE-APACHE (Apache-2.0, appendix "Copyright 2026 Mata Network") and NOTICE.md into each published crate's directory. They are byte-identical to the root files. The NOTICE is included because Apache-2.0 §4(d) expects it to travel with the work, and it carries the libxml2 attribution.
  • No manifest changes were needed: none of these crates sets include, and rusty_xml's exclude = ["tests"] does not touch these files.

After the change, each of the ten packages lists:

LICENSE-APACHE
LICENSE-MIT
NOTICE.md

Guard

The package CI job gets a new step. For every workspace package whose publish is not false, it checks that the three copies are identical to the root files (diff -u) and that cargo package --list includes them. A new crate added without the files, or a root licence edit that doesn't reach the copies, fails CI.

Not released. The next release-plz release will carry the files.

🤖 Generated with Claude Code

…d crate

All ten published crates (rusty_xml, -parser, -tree, -sax, -reader,
-writer, -xpath, -valid, -cli, -alloc) declare `MIT OR Apache-2.0`, but
`cargo package --list` showed no licence text in any of them: the files
live only at the workspace root, and cargo packages a crate's own
directory. Copy the root texts (holder "Mata Network") and the NOTICE
into each published crate's directory.

CI: the package job now checks, for every package whose `publish` is not
false, that the copies are identical to the root files and that
`cargo package --list` includes them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Ttimmahlax
Ttimmahlax merged commit 49798e3 into main Nov 20, 2026
8 checks passed
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.

2 participants