fix(sdk): FP std::to_chars fallback for Apple targets < 13.3 + release 0.16.1#145
Merged
Merged
Conversation
…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>
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.
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 installedplugin_data_api.hpp— uses the floating-pointstd::to_charsoverload, which libc++ marks unavailable below a macOS 13.3 deployment target. CCI's macOS builders target lower, and any consumer setting an olderCMAKE_OSX_DEPLOYMENT_TARGEThits 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 tosnprintf("%.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-tripstd::to_charspath. Only observable difference on the fallback path: non-minimal digits (0.1→0.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 at0.16.1(placeholder sha256 until the tag exists; the README post-tag note is now release-agnostic instead of naming a version).abi/baseline.abiuntouched (header-only inline change, no plugin impact).Testing
./build.sh --debug+./test.sh— 49/49 pass.-Wall -Wextra -Werrorand round-trip-tested.After merge
Tag
v0.16.1→ fill the real sha256 intoconandata.yml→ update CCI PR #30605 toplotjuggler_sdk/0.16.1.🤖 Generated with Claude Code