Skip to content

Fix missing license text in published crates - #1031

Merged
Keats merged 1 commit into
Keats:masterfrom
musicinmybrain:license-files
Sep 1, 2026
Merged

Keats merged 1 commit into
Keats:masterfrom
musicinmybrain:license-files

Conversation

@musicinmybrain

Copy link
Copy Markdown
Contributor

The chosen MIT license stipulates that

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

but the LICENSE file is not included in published crates. This PR fixes that by symlinking the top-level LICENSE file from the workspace.

Before:

$ git clone https://github.com/Keats/tera.git
$ cd tera/tera
$ cargo publish --dry-run
$ ls ../target/package/tera-2.3.0/
benches  bytes.py  Cargo.lock  Cargo.toml  Cargo.toml.orig  examples  README.md  src  tests

After:

$ cargo publish --dry-run
$ ls ../target/package/tera-2.3.0/
benches  bytes.py  Cargo.lock  Cargo.toml  Cargo.toml.orig  examples  LICENSE  README.md  src  tests

(The symbolic link is dereferenced and replaced with a regular file during publication as long as publication happens on a platform that understands symlinks. My understanding is that this mostly means not Windows-without-WSL. If that’s a concern, you could add duplicate copies of the LICENSE file instead. Most projects use symlinks.)

@Keats
Keats merged commit 59ea8e6 into Keats:master Sep 1, 2026
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