Dependabot & Devendoring #916
Symmetricity
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I've been working on general improvements for a couple of weeks now, and one big one that I thought warranted a discussion was de-vendoring libaries so that the repo can use upstream versions - and using dependabot to keep those versions up to date.
I've prepared some details here for your consideration:
Dependabot support for vendored C/C++ dependencies
Checked on 2026-06-06.
Context
Tilemaker vendors several third-party C/C++ libraries directly in the tree:
include/external/include/protozero/include/vtzero/server/Simple-Web-Server/Dependabot can update supported manifest ecosystems such as
vcpkg, GitHub Actions, Docker, git submodules, and several language package managers. It does not update arbitrary copied C/C++ headers or source files. Any library we keep as plain vendored source will remain a manual update unless we move it into a supported manifest, use a git submodule, or create/package a vcpkg port.Version comparison
libdeflateinclude/external/libdeflate/libdeflate.hprotozeroinclude/protozero/version.hppget_bool()buffer overrun, modern C++14 cleanup, STL/toolchain compatibility.libpopcntstreamvbytePMTilesC++ headerinclude/external/pmtiles.hppmainheaderTILETYPE_MLT, comparator helper, and safer/faster tile ID conversion with overflow checks. Needs output determinism testing.vtzeroinclude/vtzero/version.hppsqlite_modern_cppinclude/mbtiles.hnotes blob support and.initchangesSimple-Web-Serverkaguyasol2, which is available in vcpkg.polylabelmapbox-polylabelvcpkg portvisvalingam.cppminunitRecommendations
1. Move clear wins to vcpkg first
These are the best candidates because vcpkg already has ports and Dependabot can already monitor
vcpkg.json:libdeflateprotozerolibpopcntThis removes substantial vendored code, gives Dependabot a supported manifest to update, and captures real upstream fixes.
protozerois especially relevant because tilemaker depends heavily on robust PBF parsing.2. Treat
streamvbyteas the next important dependency projectstreamvbytelooks worth upgrading because newer upstream provides validation APIs and CPU-detection fixes. The blocker is packaging: Dependabot cannot bump the current copied source tree directly, and I did not find an existing vcpkg port.Options:
streamvbyte, then consume it throughvcpkg.json.gitsubmoduleecosystem.The vcpkg-port route is the cleanest if we want regular Dependabot PRs.
3. Pair
vtzerowith aprotozeromigrationvtzero1.2.0 is not a high-impact update by itself, but it follows protozero's C++14 direction. If we moveprotozeroto vcpkg, it is worth either:vtzerovcpkg port, orvtzerovendored but refreshing it manually once after the protozero update.4. Handle patched libraries separately
Some vendored libraries are not drop-in dependency swaps:
sqlite_modern_cpphas local changes for blob support and.init.Simple-Web-Serverhas local signal-handling behavior.kaguyahas local Lua compatibility changes and appears effectively stale upstream.polylabelhas local Boost.Geometry adaptation and precision changes.For these, the right first step is not simply "switch to dependency"; it is to isolate the local changes, add tests around the behavior we rely on, and then decide whether a dependency swap still makes sense.
5. Consider a bigger Lua binding migration
kaguyadoes not look like a good long-term dependency target. Upstream's latest release is from 2017, while tilemaker already carries local compatibility work. If we want a maintainable package-manager-backed Lua binding,sol2is available in vcpkg (3.5.0at the time of this check). That would be a larger migration, not a vendored-header refresh.6. Expand Dependabot beyond vcpkg
Current Dependabot coverage can be improved independently of vendored C/C++ work:
github-actionsupdates enabled.vcpkgupdates enabled.dockerupdates if we want the rootDockerfilebase image monitored.gitsubmoduleonly if we intentionally convert some vendored libraries to submodules.CDN script URLs in
server/static/index.htmland manually managed workflow variables such asPMTILES_VERSIONwill not be updated by Dependabot without changing how they are represented.Proposed path
libdeflate,protozero, andlibpopcntfrom vendored source to vcpkg dependencies.streamvbyte; if not practical, decide between submodule or documented manual vendoring.PMTilesheader in a targeted branch and compare generated PMTiles output for determinism and compatibility.sqlite_modern_cpp,Simple-Web-Server,polylabel, andkaguyauntil their local patches/adaptations are explicitly isolated.kaguyawithsol2.Sources
Beta Was this translation helpful? Give feedback.
All reactions