fix(sdk): correct the Apple to_chars guard macro spelling + release 0.16.2#146
Merged
Conversation
….16.2 0.16.1's fallback guard checked __ENVIRONMENT_MACOS_VERSION_MIN_REQUIRED__, which does not exist — clang defines __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ (verified against clang's OSTargets.cpp) — so defined(...) was always false and every Apple build still hit the unavailable FP std::to_chars (CCI round 3 failed at the same line). The guard now uses the correct macro and is fail-safe: any Apple target not provably macOS >= 13.3 takes the snprintf path. Verified by preprocessing the header's exact #if line under deployment targets 13.0/13.3/26.0/undefined/non-Apple — fallback engages exactly when it should. PATCH bump 0.16.1 -> 0.16.2; CCI staging recipe re-seeded at 0.16.2 (placeholder sha256 until the tag exists). Build (debug+ASAN) + 49/49 tests pass. 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 round 3 failed at the same
to_charsline — because 0.16.1's guard could never engage: it tested__ENVIRONMENT_MACOS_VERSION_MIN_REQUIRED__, a macro that does not exist. The compiler defines__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__(historicMAC_OS_Xspelling — verified against clang'sOSTargets.cpp, line 123).defined(...)of a misspelled macro is silently false on every platform, so all Apple builds still compiled the floating-pointstd::to_charspath.Fix
snprintffallback. Worst case is a slightly slower, non-minimal-digits (but exact) formatting whereto_charswas actually available.Verification (no Mac required)
The 0.16.1 bug slipped through because I tested a re-typed copy of the branch body, not the header's actual
#if. This time the header's exact guard lines are extracted verbatim and run through the preprocessor across the matrix:__APPLE__, target 13.0 (= CCI'sMACOSX_DEPLOYMENT_TARGET)__APPLE__, target 13.3std::to_chars__APPLE__, target 26.0std::to_chars__APPLE__, macro undefined (e.g. iOS)std::to_charsPlus
./build.sh --debug+./test.sh— 49/49 pass.Release 0.16.2 (PATCH)
Same drill: three version sources + docstring,
[0.16.2]CHANGELOG entry, CCI staging recipe re-seeded at 0.16.2 with placeholder sha256.After merge
Tag
v0.16.2→ fill real sha256 → update CCI PR #30605 toplotjuggler_sdk/0.16.2.🤖 Generated with Claude Code