Skip to content

Issue fixes: monotonic durations, installable SDK, static builds with libcurl, system nlohmann/json - #161

Merged
turtledreams merged 2 commits into
stagingfrom
issue-fixes
Oct 17, 2026
Merged

turtledreams merged 2 commits into
stagingfrom
issue-fixes

Conversation

@turtledreams

@turtledreams turtledreams commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

What

Fixes for four open issues:

Tidy (second commit)

  • CHANGELOG: section renamed to ## 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.
  • Comments cut to single-line notes.
  • The nlohmann/json version error now names the COUNTLY_USE_SYSTEM_JSON remedy.
  • CI: static-builtin-http and system-json flavors, and an install job (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:

Check staging this branch
Static build with the built-in HTTP client (Linux) configure error builds and installs; the app links and runs
App compiled against the installed tree only (Linux shared, Linux static, Windows DLL) countly.hpp: No such file compiles and runs
App that finds nlohmann/json 3.7.3 first on its include path compiles, mixing 3.7.3 with 3.12.0 stops with the new error
COUNTLY_USE_SYSTEM_JSON=ON with the system nlohmann/json 3.7.3 - configure error (requires 3.11)
COUNTLY_USE_SYSTEM_JSON=ON with a nlohmann/json 3.12.0 package - builds, unit tests pass (68/68); the install skips the bundled JSON

The new CI configurations (install-shared, install-static, static-builtin-http, system-json) also pass locally. In one system-json run, 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

  • An app that links the installed static library also links libcurl and OpenSSL (-lcurl -lssl -lcrypto -lpthread). Builds that add the SDK with add_subdirectory get these from CMake.

Addresses #100, #103, #36, #34.

🤖 Generated with Claude Code

https://claude.ai/code/session_017YYaqXRqRFW3PxHyzgwNa9

…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
@turtledreams turtledreams changed the title Issue Fixes Issue fixes: monotonic durations, installable SDK, static builds with libcurl, system nlohmann/json Oct 17, 2026
@turtledreams
turtledreams merged commit 8e88271 into staging Oct 17, 2026
28 checks passed
@turtledreams
turtledreams deleted the issue-fixes branch October 17, 2026 07:53
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