Repository navigation
Issue fixes: monotonic durations, installable SDK, static builds with libcurl, system nlohmann/json - #161
Merged
Conversation
…ON builds - CHANGELOG section as XX.XX.XX with one line per entry, and a minor breaking line for the nlohmann/json version check - comments cut to single-line notes - the version check's message names COUNTLY_USE_SYSTEM_JSON - CI: static-builtin-http and system-json flavors, and an install job that compiles and runs an app against the installed SDK only Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017YYaqXRqRFW3PxHyzgwNa9
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.
What
Fixes for four open issues:
std::chrono::steady_clock, so a system clock change no longer distorts them. Request timestamps stay onsystem_clock.cmake --installputscountly.hppin the include root, all public headers underinclude/countly, and the bundled nlohmann/json next to them. The missing DLL from the same issue was already fixed in 26.8.0.COUNTLY_USE_SYSTEM_JSONCMake option (defaultOFF) builds the SDK against the app's own nlohmann/json 3.11+. The headers now stop with a clear error when they find a nlohmann/json older than 3.11 first on the include path. The CHANGELOG marks that as a minor breaking change: such builds compiled before, while mixing two versions of the library.Tidy (second commit)
## XX.XX.XX, one line per entry in the file's style (the long lines failed Codacy's MD013), and the breaking line above added.COUNTLY_USE_SYSTEM_JSONremedy.static-builtin-httpandsystem-jsonflavors, and aninstalljob (shared and static) that compiles and runs an app against the installed prefix only.Verification
Local runs on Ubuntu 20.04 (WSL, g++ 9.4, CMake 3.16) and Windows (MSVC 2026), staging against this branch:
countly.hpp: No such fileCOUNTLY_USE_SYSTEM_JSON=ONwith the system nlohmann/json 3.7.3COUNTLY_USE_SYSTEM_JSON=ONwith a nlohmann/json 3.12.0 packageThe new CI configurations (
install-shared,install-static,static-builtin-http,system-json) also pass locally. In onesystem-jsonrun, the existing test "Tests setting 'setEventsToRQThreshold' before we start the SDK" found the HTTP queue empty once; it then passed 5 of 5 times on its own and in a full rerun (83/83), so it looks timing-dependent rather than related to this change.Not covered by a test: a system clock change during a session. The durations read
steady_clock::now()directly, so there is no seam to fake the clock; reviewed in the code.Notes for docs
-lcurl -lssl -lcrypto -lpthread). Builds that add the SDK withadd_subdirectoryget these from CMake.Addresses #100, #103, #36, #34.
🤖 Generated with Claude Code
https://claude.ai/code/session_017YYaqXRqRFW3PxHyzgwNa9