Skip to content

updates //third_party packages and replaces submodules w/ FetchContent#475

Open
cjdb wants to merge 2 commits intochromium:mainfrom
cjdb:third_party
Open

updates //third_party packages and replaces submodules w/ FetchContent#475
cjdb wants to merge 2 commits intochromium:mainfrom
cjdb:third_party

Conversation

@cjdb
Copy link
Copy Markdown
Contributor

@cjdb cjdb commented Feb 27, 2026

Some libraries were getting stale, and subspace wasn't able to build with the default libraries, so everything in //third_party has been update to tip-of-tree, except for md4c.

This commit also changes the dependency structure from using submodules to FetchContent. FetchContent moves the package management from Git into CMake. FetchContent allows CMake to synchronise dependencies for an entire project (e.g. a project using both libfmt and Subspace only clones and builds libfmt once, instead of once for Subspace and once for itself).

FetchContent downloads dependencies during project configuration. As such, Subspace only downloads packages that it needs for a specific configuration (e.g. nanobench isn't cloned when benchmarking is disabled).

Finally, Git submodules require manual synchronisation. This can lead to problems with ensuring that the third-party packages exist or are up-to-date. FetchContent ensures that projects checkout a canonical commit (and can more easily change that if necessary) due to everything being handled at the config step. Users that update Subspace won't also need to worry about updating Subspace's dependencies, because it's already been taken care of for them.

@danakj danakj self-requested a review February 27, 2026 13:10
@cjdb cjdb force-pushed the third_party branch 2 times, most recently from 830ed97 to 0d2c542 Compare March 8, 2026 06:10
cjdb added a commit to cjdb/subspace that referenced this pull request Mar 9, 2026
PR chromium#475 uses Git for package management, so we need to give the CI some
sort of identity. The email is a fake email, just to satisfy using Git.
cjdb added a commit to cjdb/subspace that referenced this pull request Mar 9, 2026
PR chromium#475 uses Git for package management, so we need to give the CI some
sort of identity. The email is a fake email, just to satisfy using Git.
danakj pushed a commit that referenced this pull request Mar 9, 2026
PR #475 uses Git for package management, so we need to give the CI some
sort of identity. The email is a fake email, just to satisfy using Git.
cjdb added a commit to cjdb/subspace that referenced this pull request Mar 9, 2026
PR chromium#475 uses Git for package management, so we need to give all the
GitHub workflows an identity. The emails are fake, and only exist in
the file to satisfy Git's requirements.
cjdb added a commit to cjdb/subspace that referenced this pull request Mar 9, 2026
PR chromium#475 uses Git for package management, so we need to give all the
GitHub workflows an identity. The emails are fake, and only exist in
the file to satisfy Git's requirements.
danakj pushed a commit that referenced this pull request Mar 9, 2026
PR #475 uses Git for package management, so we need to give all the
GitHub workflows an identity. The emails are fake, and only exist in the
file to satisfy Git's requirements.
cjdb added 2 commits March 9, 2026 18:57
Some libraries were getting stale, and subspace wasn't able to build
with the default libraries, so everything in //third_party has been
update to tip-of-tree, except for md4c.

This commit also changes the dependency structure from using submodules
to `FetchContent`. `FetchContent` moves the package management from Git
into CMake. `FetchContent` allows CMake to synchronise dependencies for
an entire project (e.g. a project using both libfmt and Subspace only
clones and builds libfmt once, instead of once for Subspace and once
for itself).

`FetchContent` downloads dependencies during project configuration. As
such, Subspace only downloads packages that it needs for a specific
configuration (e.g. nanobench isn't cloned when benchmarking is disabled).

Finally, Git submodules require manual synchronisation. This can lead to
problems with ensuring that the third-party packages exist or are
up-to-date. `FetchContent` ensures that projects checkout a canonical
commit (and can more easily change that if necessary) due to everything
being handled at the config step. Users that update Subspace won't also
need to worry about updating Subspace's dependencies, because it's
already been taken care of for them.
Rather than depending on the system's LLVM and Clang, we move Subspace
to pull a specific version of llvm-project instead. Due to more modern
versions of LLVM being incompatible with Subdoc, we conservatively pin
the tag at LLVM 17.0.6, which is the version used by CI.
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.

1 participant