Skip to content

Add feature checks for std::from_chars in CMake configuration - #328

Merged
vincentlaucsb merged 5 commits into
vincentlaucsb:masterfrom
Lonely-Dream:issue327
Sep 20, 2026
Merged

vincentlaucsb merged 5 commits into
vincentlaucsb:masterfrom
Lonely-Dream:issue327

Conversation

@Lonely-Dream

@Lonely-Dream Lonely-Dream commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Credit to @Lonely-Dream for the original floating-point std::from_chars capability-detection fix in csv-parser PR #328, which the upstream 1.1.1 fix and this integration build on.

Fixes #327 and #194.

Detect floating-point std::from_chars by compiling and linking a CMake probe, then pass its boolean result to both library targets using the upstream-owned CLASSIFY_SCALAR_USE_STD_FLOAT_FROM_CHARS macro. Standalone generated headers use the standard feature macro, and the explicit opt-out takes precedence.

The header fix is merged upstream in vincentlaucsb/classify_scalar#2 and published as v1.1.1. This PR imports that release header byte-for-byte from commit 42652a1c0159719cb731e098e04ddc683c2d72f2; there are no csv-parser-specific edits inside the vendored header.

Add a repeatable sync command and a provenance file recording the upstream commit, version, and SHA-256. CI compares the vendored bytes to the pinned upstream source. A manual “Sync classify_scalar” workflow accepts an upstream tag or commit and opens future update PRs. It uses the default workflow token, with an optional bot token for CI that starts without an approval prompt. Usage and setup are documented in include/external/README.md.

Validation: the earlier CMake fix passed all GCC 8.5, 9.5, 10.5, and 11.1 checks. The upstream 1.1.1 fix also passed those four compilers. After this sync, all four local MSVC library/generated-header smoke checks passed, remote provenance verification passed, a simulated local header modification was rejected, and actionlint/diff checks passed. The final release-tag sync is byte-identical; all four downstream GCC checks and upstream-provenance verification pass. All 36 downstream checks passed on the final commit.

Coverage-only test runs now exclude tests tagged [stress]: the 500-iteration ThreadSafeDeque stress loop exceeded its existing 60-second deadline under gcov. Normal and sanitizer jobs continue to run it; the focused race regression remains in coverage. Verified generated CTest commands with coverage on/off and ran the stress case locally.

@codecov

codecov Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.58%. Comparing base (1ba20ac) to head (377e0b5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #328      +/-   ##
==========================================
- Coverage   91.64%   91.58%   -0.06%     
==========================================
  Files          55       55              
  Lines        3541     3541              
  Branches     1043     1043              
==========================================
- Hits         3245     3243       -2     
- Misses        114      115       +1     
- Partials      182      183       +1     
Flag Coverage Δ
cpp 91.43% <ø> (-0.07%) ⬇️
python 93.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vincentlaucsb vincentlaucsb reopened this Sep 20, 2026
@vincentlaucsb
vincentlaucsb merged commit 5976d7a into vincentlaucsb:master Sep 20, 2026
36 checks passed
@vincentlaucsb

Copy link
Copy Markdown
Owner

Thanks for the PR!

@Lonely-Dream
Lonely-Dream deleted the issue327 branch September 30, 2026 08:59
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.

std::from_chars floating-point path is enabled on GCC 8–10 due to C++17-only detection

2 participants