feat: the licence text of every crate travels inside the app - #49
Merged
Merged
Conversation
THIRD-PARTY-BUNDLED.md names each crate and its licence, but MIT, Apache, BSD, ISC, BSL, Zlib, Unicode and MPL ask for the text itself to go with the copy. npm run notices now also writes THIRD-PARTY-LICENSES.md: the licence files each linked crate ships, LICENSES/ and NOTICE included, each text once under the crates that carry it, 234 texts for 367 crates. A crate that ships no file gets the text of the licence it declares: Apache when offered, SPDX's BSL-1.0 and MPL-2.0 from scripts/licences, and MIT, BSD-3 or ISC with the manifest's authors. The generator refuses to write if any crate is left without one, and two runs give the same bytes. The binary includes the file, and About opens it under a second button with the same viewer; the notices command takes which file to hand back, so lib.rs stays under its ceiling. The notices check and the release compare both files.
…the notices Picking one licence out of "(MIT OR Apache-2.0) AND Unicode-3.0" would have written the MIT text alone and dropped the one the AND requires. Such a crate now joins the ones with no text, and the generator refuses to write.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
THIRD-PARTY-BUNDLED.mdnames each crate and its licence, but MIT, Apache, BSD, ISC, BSL, Zlib, Unicode and MPL ask for the text itself to travel with the copy.npm run noticesalso writesTHIRD-PARTY-LICENSES.md: for every linked crate, its root licence files,NOTICE,LICENSES/(where Slint keeps its own) andlicense_file, CRLF normalised and deduplicated by sha256. 234 texts for 367 crates, 708 KB.36 crates ship no file. They get the text of the licence they declare: Apache-2.0 when offered, SPDX's BSL-1.0 and MPL-2.0 from
scripts/licences/, MIT, BSD-3 or ISC with the manifest's authors. The generator refuses to write if any crate is left without a text.The binary includes the file. About opens it under a second button, Licence texts, with the same viewer, one shelf open at a time. The
noticescommand takeslicences: bool, solib.rsstays under its ceiling.The notices check in
rules.ymland the release compare both files, and a PR touchingscripts/licences/or the new file triggers the check.Three About tests (asked only when opened, gives way to the notices, a failure is said);
markdown.test.tsrequires every link in both real files to be absoluteTwo runs give the same sha256; ordering does not depend on the locale
vitest 167/167, tsc, lint, fmt, clippy
-D warnings,rules.sh, markdownlintOpen Licence texts in a built copy and check that 708 KB renders smoothly