Skip to content

fix(sdk): FP std::to_chars fallback for Apple targets < 13.3 + release 0.16.1#145

Merged
facontidavide merged 1 commit into
mainfrom
fix/apple-to-chars-availability
Jul 10, 2026
Merged

fix(sdk): FP std::to_chars fallback for Apple targets < 13.3 + release 0.16.1#145
facontidavide merged 1 commit into
mainfrom
fix/apple-to-chars-availability

Conversation

@facontidavide

Copy link
Copy Markdown
Contributor

Summary

CCI PR conan-io/conan-center-index#30605 round 2 failed on macOS with a real SDK bug: SettingsStoreView::setValue(key, double) — an inline method in the installed plugin_data_api.hpp — uses the floating-point std::to_chars overload, which libc++ marks unavailable below a macOS 13.3 deployment target. CCI's macOS builders target lower, and any consumer setting an older CMAKE_OSX_DEPLOYMENT_TARGET hits the same compile error. (The SDK's own macOS CI passes only because GitHub runners default to the host's new-enough target.)

Fix

On Apple targets below 13.3 (__ENVIRONMENT_MACOS_VERSION_MIN_REQUIRED__ < 130300), fall back to snprintf("%.17g") — round-trips any IEEE double (verified standalone for max double, min subnormal, zero; longest output is 24 chars in the 40-byte buffer). All other platforms keep the shortest-round-trip std::to_chars path. Only observable difference on the fallback path: non-minimal digits (0.10.10000000000000001), values preserved exactly. The header is also made self-contained (<charconv>/<cstdio> were only transitive).

Release 0.16.1 (PATCH)

Installed-header bug fix → PATCH per the versioning policy. Bumps the three version sources + docstring, adds the [0.16.1] CHANGELOG entry, and re-seeds the CCI staging recipe at 0.16.1 (placeholder sha256 until the tag exists; the README post-tag note is now release-agnostic instead of naming a version). abi/baseline.abi untouched (header-only inline change, no plugin impact).

Testing

  • ./build.sh --debug + ./test.sh — 49/49 pass.
  • Fallback branch compiled standalone with -Wall -Wextra -Werror and round-trip-tested.

After merge

Tag v0.16.1 → fill the real sha256 into conandata.yml → update CCI PR #30605 to plotjuggler_sdk/0.16.1.

🤖 Generated with Claude Code

…e 0.16.1

SettingsStoreView::setValue(key, double) — inline in the installed
plugin_data_api.hpp — used the floating-point std::to_chars overload,
which libc++ marks unavailable below a macOS 13.3 deployment target.
Conan Center's macOS builders (and any consumer with an older
CMAKE_OSX_DEPLOYMENT_TARGET) failed to compile the SDK. On such targets
fall back to snprintf("%.17g"), which round-trips any IEEE double;
everyone else keeps the shortest-round-trip std::to_chars path. Also make
the header self-contained (<charconv>/<cstdio> were transitive).

PATCH bump 0.16.0 -> 0.16.1 (installed-header bug fix): three version
sources + docstring + CHANGELOG. CCI staging recipe re-seeded at 0.16.1
(placeholder sha256 until the tag exists; README's post-tag note is now
release-agnostic).

Build (debug+ASAN) + 49/49 tests pass; fallback branch round-trip
verified standalone for max/subnormal/zero doubles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@facontidavide facontidavide merged commit 7b0aebd into main Jul 10, 2026
6 of 7 checks passed
@facontidavide facontidavide deleted the fix/apple-to-chars-availability branch July 10, 2026 15:52
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