Repository navigation
Build on libmongoc 2.0–2.2 (Ubuntu 26.04) and drop the misleading apt hint - #32
Merged
Merged
Conversation
4.0.1 failed to compile against libmongoc 2.2.2 (Ubuntu 26.04 LTS's libmongoc-dev): bson_append_array_unsafe_begin only exists from libbson 2.3, which also deprecated bson_append_array_begin. A PerfectCBSON shim now picks whichever this libbson has, so builds stay warning-free on 2.3+ and work on 2.0-2.2. SwiftPM's apt provider hint said `apt-get install libmongoc-dev`, which installs 1.x on Ubuntu 24.04 (the swift:*-noble images) and Debian 13. It can't vary by release, so it's removed; the README now lists which distributions' packages are new enough. CI gains an Ubuntu 26.04 job using apt's libmongoc (2.2.2), the oldest supported version. Full suite passes on 2.2.2 (Linux) and 2.5.5 (macOS, Linux). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two Linux installation problems, intended for a 4.0.2 patch release.
1. 4.0.1 doesn't compile against libmongoc 2.2 (Ubuntu 26.04 LTS)
Ubuntu 26.04's
libmongoc-devis 2.2.2. 4.0.1 callsbson_append_array_unsafe_begin, which libbson only added in 2.3.0; the same release deprecatedbson_append_array_begin. A smallPerfectCBSONshim now usesBSON_CHECK_VERSION(2, 3, 0)to call whichever this libbson has. The result builds warning-free on 2.3+ and still works on 2.0–2.2.2. The apt install hint was misleading
When libmongoc is missing, SwiftPM printed
apt-get install libmongoc-devfrom the package'sproviders:. On Ubuntu 24.04, the base of the officialswift:*-nobleimages, and on Debian 13, that installs libmongoc 1.x, which 4.x can't use. SwiftPM's hint can't vary by release, so the apt provider is removed and the Homebrew one, which is correct, stays. The READMEs (English and Chinese) now list which distributions' packages work:libmongoc-devCI
There's a new
linux-aptjob: theswift:6.4-resolutecontainer with libmongoc from plainapt(2.2.2). It tests the oldest supported libmongoc and the README's apt instructions.Testing
Full suite (36 tests):
No warnings on 2.5.5.
🤖 Generated with Claude Code