Skip to content

Ship third-party license notices in the native platform packages - #8594

Merged
cknitt merged 1 commit into
masterfrom
codex/third-party-licenses
Nov 10, 2026
Merged

cknitt merged 1 commit into
masterfrom
codex/third-party-licenses

Conversation

@cknitt

@cknitt cknitt commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

Each native platform package (@rescript/<platform>) now ships a THIRD_PARTY_LICENSES file with the notices for the third-party software compiled into its binaries:

  • Vendored Flow parser, Sedlex, and the OCaml-derived Flow_map/Flow_set
  • The JavaScript pretty-printer adapted from js_of_ocaml (js_of_ocaml itself is not linked)
  • Reanalyze code adapted from LexiFi/dead_code_analyzer
  • Every opam package the shipped executables link, including the OCaml runtime and stdlib, and libuv as bundled by luv
  • glibc on Linux, because the binaries are linked statically on the Ubuntu runners
  • The MinGW-w64 runtime and winpthreads on Windows

The file replaces the hand-written THIRD_PARTY_NOTICES_REWATCH.md and RE_LICENSE.md that the OCaml build system added (#8780).

scripts/generateThirdPartyLicenses.js (yarn licenses:generate) builds the files from licenses/components.json:

  • OCaml libraries are entries with an opam field. Their version and license text come from the opam switch: opam var <pkg>:version and the license file in opam var <pkg>:doc. The libuv version is read from luv's installed uv/version.h. A dependency upgrade therefore needs no manual edits; regenerating is enough.
  • The script walks dune describe workspace from the four shipped executables. It fails when a linked opam package is missing from the inventory, or when the inventory lists one that isn't linked. dune's requires includes PPX runtime libraries but not the rewriters themselves.
  • Vendored sources and toolchains keep their license texts in the repository.

The files are committed. The linux-x64 build job checks them with --check against its switch, the one the release binaries come from.

The Flow README is also corrected: the retained collection sources are now only the LGPL Flow_map/Flow_set.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gLboTZTRoQAbXc4ZzC

@cknitt
cknitt force-pushed the codex/third-party-licenses branch 2 times, most recently from 3e4cda7 to 21709c8 Compare August 29, 2026 05:09
@pkg-pr-new

pkg-pr-new Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8594

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@8594

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8594

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8594

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8594

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8594

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8594

commit: a29b324

@github-actions

Copy link
Copy Markdown

@cknitt
cknitt force-pushed the codex/third-party-licenses branch from 21709c8 to 4a37e7d Compare November 8, 2026 20:08
@cknitt cknitt changed the title Add third-party license notices to native packages Ship third-party license notices in the native platform packages Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Changelog

💅 Polish

  • Ship a THIRD_PARTY_LICENSES file in each native platform package with the notices for all vendored sources, linked OCaml libraries, and the glibc and MinGW-w64 runtimes.

Semantic Diff

1 commit · Full page

Ship third-party license notices in the native platform packages

9b0282f · cknitt + Claude · Nov 08, 2026, 20:08 UTC

Each @rescript/<platform> package now ships a THIRD_PARTY_LICENSES file generated from licenses/components.json. It covers the vendored Flow, Sedlex and js_of_ocaml sources, the LexiFi-derived reanalyze code, every linked OCaml library, and the glibc and MinGW-w64 runtimes, which are linked statically. It replaces the rewatch-only THIRD_PARTY_NOTICES_REWATCH.md and RE_LICENSE.md.

The generator takes the versions and license texts of OCaml libraries from the opam switch and asks dune which opam packages the shipped executables link, failing when the inventory misses one or lists one that is not linked. The files are committed; the linux-x64 build job checks them.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 456,989,425 → 456,989,425 (±0.00%).

None of the 257 benchmarks changed by 0.1% or more.

Instructions

In total: 10,226,962,471 → 10,226,962,471 (±0.00%).

None of the 33 benchmarks changed by 0.1% or more.

Pull request 9b0282f compared with base d47adb3 in this run.

@cknitt
cknitt force-pushed the codex/third-party-licenses branch 3 times, most recently from 023c15e to 3773646 Compare November 8, 2026 20:32
@cknitt
cknitt force-pushed the codex/third-party-licenses branch from 3773646 to 9b0282f Compare November 8, 2026 21:43
@cknitt

cknitt commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T16:24:06.434839Z 9b0282f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cknitt
cknitt marked this pull request as ready for review November 10, 2026 16:22
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 9b0282f4a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Each @rescript/<platform> package now ships a THIRD_PARTY_LICENSES file
generated from licenses/components.json. It covers the vendored
Flow, Sedlex and js_of_ocaml sources, the LexiFi-derived reanalyze code,
every linked OCaml library, and the glibc and MinGW-w64 runtimes, which
are linked statically. It replaces the rewatch-only
THIRD_PARTY_NOTICES_REWATCH.md and RE_LICENSE.md.

The generator takes the versions and license texts of OCaml libraries
from the opam switch and asks dune which opam packages the shipped
executables link, failing when the inventory misses one or lists one that
is not linked. The files are committed; the linux-x64 build job checks
them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLboTZTRoQAbXc4ZzC
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt
cknitt force-pushed the codex/third-party-licenses branch from 9b0282f to a29b324 Compare November 10, 2026 17:27
@github-actions

Copy link
Copy Markdown

Changelog

💅 Polish

  • Ship a THIRD_PARTY_LICENSES file in each native platform package with the notices for all vendored sources, linked OCaml libraries, and the glibc and MinGW-w64 runtimes.

Semantic Diff

1 commit · Full page

Ship third-party license notices in the native platform packages

a29b324 · cknitt + Claude · Nov 08, 2026, 20:08 UTC

Each @rescript/<platform> package now ships a THIRD_PARTY_LICENSES file generated from licenses/components.json. It covers the vendored Flow, Sedlex and js_of_ocaml sources, the LexiFi-derived reanalyze code, every linked OCaml library, and the glibc and MinGW-w64 runtimes, which are linked statically. It replaces the rewatch-only THIRD_PARTY_NOTICES_REWATCH.md and RE_LICENSE.md.

The generator takes the versions and license texts of OCaml libraries from the opam switch and asks dune which opam packages the shipped executables link, failing when the inventory misses one or lists one that is not linked. The files are committed; the linux-x64 build job checks them.

@github-actions

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 683,221,231 → 683,220,947 (±0.00%).

Generated projects: 923,208,001 → 923,209,226 (±0.00%).

None of the 265 benchmarks changed by 0.1% or more.

Instructions

In total: 9,666,123,646 → 9,666,123,646 (±0.00%).

None of the 33 benchmarks changed by 0.1% or more.

Output size

In total: 25,841,785 → 25,841,785 (±0.00%).

None of the 13 benchmarks changed by 0.1% or more.

Pull request a29b324 compared with base e8ba9f9 in this run.

@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.97%. Comparing base (e8ba9f9) to head (a29b324).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8594   +/-   ##
=======================================
  Coverage   81.96%   81.97%           
=======================================
  Files         456      456           
  Lines       65613    65613           
=======================================
+ Hits        53781    53783    +2     
+ Misses      11832    11830    -2     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown

@cknitt
cknitt merged commit dcedd5d into master Nov 10, 2026
20 of 22 checks passed
@cknitt
cknitt deleted the codex/third-party-licenses branch November 10, 2026 18:08
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