Skip to content

[build] Switch lz4 submodule to upstream lz4/lz4#11671

Open
jonathanpeppers wants to merge 1 commit into
dotnet:mainfrom
jonathanpeppers:jonathanpeppers/track-upstream-lz4
Open

[build] Switch lz4 submodule to upstream lz4/lz4#11671
jonathanpeppers wants to merge 1 commit into
dotnet:mainfrom
jonathanpeppers:jonathanpeppers/track-upstream-lz4

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Summary

The external/lz4 submodule has been pointing at dotnet/lz4 (a fork of lz4/lz4) for historical reasons. The fork carries zero downstream changes -- every commit "ahead" of upstream is just a no-op merge from the periodic mirror sync. This PR switches the submodule to track upstream lz4/lz4 directly so we can pick up active maintenance and security fixes when we next bump the pin.

Verification: the fork has no custom changes

Confirmed via:

gh api repos/lz4/lz4/compare/68959d27c3ec37b339b3b8ecfea155faf0ef94f2...dotnet:lz4:ebb370ca83af193212df4dcbadcc5d87bc0de2f0

ahead_by=5, behind_by=0, files-changed=0. The 5 "ahead" commits are all merge commits with no file changes; last sync was July 2024.

Changes

  • .gitmodules: url = https://github.com/lz4/lz4, branch = dev.
  • external/lz4 gitlink: bumped from ebb370ca83af193212df4dcbadcc5d87bc0de2f0 (a merge commit owned by the fork) to 68959d27c3ec37b339b3b8ecfea155faf0ef94f2, which is the upstream dev-side parent of that merge. The two trees are byte-identical (same root tree SHA 1ff35e0f086e3b431ea0efd001eb5c6254561953), so this is a no-op for the source content.
  • .github/skills/update-tpn/SKILL.md: drop the "(fork of ...)" note on the lz4 row -- it's no longer a fork.

THIRD-PARTY-NOTICES.TXT is left alone -- the existing lz4/lz4 block is already correctly attributed to upstream.

Build verification

dotnet-local.cmd build src/native/native-mono.csproj -p:Configuration=Debug

Produces 0 errors (81 unrelated warnings) and the expected libxa-lz4-release.a artifacts for all four ABIs:

ABI Size
android-arm 320,240 bytes
android-arm64 484,704 bytes
android-x64 540,856 bytes
android-x86 364,448 bytes

Related

Supersedes #11658, which had vendored the lz4 sources into src-ThirdParty/lz4/; that approach was abandoned in favor of this simpler submodule URL switch.

The `external/lz4` submodule has been pointing at `dotnet/lz4` (a fork of
`lz4/lz4`) for historical reasons, but the fork carries no downstream
changes -- every commit "ahead" of upstream is just a no-op merge from
the periodic mirror sync.

Switch the submodule to track upstream `lz4/lz4` directly so we can pick
up active maintenance and security fixes when we next bump the pin.

Changes:

  * `.gitmodules`: `url = https://github.com/lz4/lz4`,
    `branch = dev`.
  * `external/lz4` gitlink: bumped from
    `ebb370ca83af193212df4dcbadcc5d87bc0de2f0` (a merge commit owned by
    the fork) to `68959d27c3ec37b339b3b8ecfea155faf0ef94f2`, which is
    the upstream `dev`-side parent of that merge. The two trees are
    byte-identical (same root tree SHA `1ff35e0f...`), so this is a
    no-op for the source content.
  * `.github/skills/update-tpn/SKILL.md`: drop the "(fork of ...)" note
    on the lz4 row -- it's no longer a fork.

Verified `dotnet-local.cmd build src/native/native-mono.csproj
-p:Configuration=Debug` produces 0 errors and the expected
`libxa-lz4-release.a` for all four ABIs (`android-arm`, `android-arm64`,
`android-x64`, `android-x86`).

This supersedes dotnet#11658, which had vendored the lz4 sources into
`src-ThirdParty/lz4/`; that approach was abandoned in favor of this
simpler submodule URL switch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 16, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR repoints the external/lz4 submodule from the inactive dotnet/lz4 fork to the upstream lz4/lz4 repository, keeping the checked-in source content effectively the same while enabling future updates to track upstream maintenance/security fixes.

Changes:

  • Update .gitmodules to use https://github.com/lz4/lz4 and track the dev branch for the external/lz4 submodule.
  • Update the update-TPN skill inventory to reflect the new upstream URL for lz4.
  • (As described) Move the external/lz4 gitlink to the upstream commit that matches the fork’s merge-parent content.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.gitmodules Switch external/lz4 submodule URL to upstream lz4/lz4 and set tracking branch to dev.
.github/skills/update-tpn/SKILL.md Update the documented submodule URL for lz4 to match the new upstream location.
external/lz4 Update the submodule gitlink to the corresponding upstream commit (content-equivalent to the previously pinned fork merge).

@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants