Repository navigation
Fix CI on develop - #5750
Merged
Merged
Fix CI on develop#5750
Conversation
- gcc_flags.cmake: drop -Wexperimental-fmv-target, which GCC 16 accepts only on aarch64; amd64 rejects it, so every GCC job failed while checking the compiler. - ci_get_cmake: add VERBATIM so the checksum pipeline is passed to the shell intact (the unescaped `$'` broke the generated Makefile and build.ninja, failing ci_cmake_flags and ci_module_cpp20); match the SHA-256 entry case-insensitively, as CMake 3.5.0 lists the archive as "Linux-x86_64"; and unpack with --strip-components, as that archive's top-level directory is spelled "Linux" too. - ci_single_binaries: compile json.hpp's TU without IWYU's --error, as the comment above the gate already intends. - tests: restore -Wno-deprecated-declarations for all non-MSVC compilers (#5737 kept it for GCC only), as several tests call deprecated functions on purpose; include thirdparty/fifo_map as SYSTEM. - .clang-tidy: set misc-use-internal-linkage.AnalyzeTypes to false; clang-tidy 22.1 extended the check to classes and enums and flagged 100 test helper types. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
- binary_reader: pass integers to sax->number_integer() through conditional_static_cast<number_integer_t>, making the existing narrowing for a narrow number_integer_t explicit (MSVC C4244 and GCC -Wconversion/-Warith-conversion with the int16_t test from #5694); mark two Infer DEAD_STORE false positives with @infer-ignore. - to_json: set the parents of an array built from a C++20 range view after all elements are in place; a reallocating push_back moved the earlier elements and left their parent pointers stale, failing the JSON_DIAGNOSTICS invariant assertion. - json.hpp: suppress MSVC C4127 for the new is_ordered_map check in diff(), like the three existing ones; spell out std::formatter::parse's return and iterator types for clang-tidy 22.1. - number_parse: make the Eisel-Lemire digit counter unsigned (GCC -Wstrict-overflow). - string_utils: take encode_utf8's callable by const reference (cppcoreguidelines-missing-std-forward) and drop a \u from its doc comment (-Wdocumentation-unknown-command). - ordered_map: include <memory> for std::allocator (cpplint). Ran make amalgamate. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
- unit-allocator: skip the #5640 test under MSVC STL iterator debugging, where containers allocate a debug proxy in noexcept move constructors and a failing allocation terminates; move a decrement out of an if condition (bugprone-inc-dec-in-conditions). - unit-conversions: expect the "(/0)" path with JSON_DIAGNOSTICS; compare strict enums via get<>() rather than through the noexcept operator==(ScalarType, json), which bugprone-exception-escape flags. - unit-alt-string: suppress -Wexit-time-destructors for the strict enum macro and misc-use-internal-linkage for its enum. - unit-bjdata: call the static lookup functions through the type and pass unsigned char (-Wsign-conversion on amd64). - Mark Infer false positives with @infer-ignore in unit-diagnostics, unit-pointer_access, unit-udt, and unit-conversions. - Smaller clang-tidy 22.1 findings in unit-class_parser, unit-constructor2, unit-custom-base-class, unit-locale-cpp, and unit-noexcept. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
nlohmann
added this pull request to stack #5752
October 2, 2026 08:19
SA-gitlab-to-github
pushed a commit
to DarkhiveAI/dh-fork-json
that referenced
this pull request
Oct 3, 2026
Conflicts: - number_parse.hpp: kept this branch's float parser, which replaces the Eisel-Lemire code that develop's side changed (nlohmann#5750 made its digit counter unsigned; this parser has no such counter, and it compiles cleanly with GCC's -Wstrict-overflow=5). - number_handling.md, template_parameters.md: kept this branch's description of the conversion and added develop's "Before version 3.13.0" sentence. Ran make amalgamate. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
4 of 6 tasks
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.
Develop has had no green Ubuntu or Windows run since 09-23 (1054b20). Several PRs merged in the meantime while the Actions queue was backed up, and two CI tools were updated (
gcc:latest→ GCC 16.2, clang-tidy 22.0 → 22.1.8). This PR fixes every failure I could find on develop 6aec1a0. It also unblocks #5744, #5743, and #5638, which fail only because of develop.CI configuration
ci_test_gcc,ci_test_standards_gcc):-Wexperimental-fmv-target, added in Fix lint debt: enum-macro NOLINTs, doctest as SYSTEM, no-op analyzer #5737, is aarch64-only, so amd64 GCC 16 rejects it. Removed.ci_cmake_flags,ci_module_cpp20: the checksum command inci_get_cmakelackedVERBATIM, so$'broke the generated Makefile andbuild.ninja. The CMake 3.5.0 download also failed twice, because its checksum file and archive directory both spell itLinux-x86_64.ci_single_binaries: json.hpp's IWYU findings are meant to be informational, but--errorstill failed its build.ci_clang_tidy,ci_test_clang*: Fix lint debt: enum-macro NOLINTs, doctest as SYSTEM, no-op analyzer #5737 removed the blanket-Wno-deprecated, but several tests call deprecated functions on purpose. This restores only-Wno-deprecated-declarations, so-Wfloat-equalstays active. It also turns off clang-tidy 22.1's newmisc-use-internal-linkagechecking of types (100 test helper types) and includes fifo_map as SYSTEM.Library
binary_reader: integer values passed tosax->number_integer()now go throughconditional_static_cast<number_integer_t>. This makes the existing narrowing for a narrownumber_integer_texplicit (MSVC C4244 and GCC-Wconversionwith Fix to_msgpack() reading the inactive number union member #5694'sint16_ttest).push_backreallocated, which tripped the invariant assertion (test-regression3_cpp20aborted). Parents are now set once all elements are in place.diff()(Diff deeply nested values without recursing per nesting level #5548)-Wstrict-overflowin the Eisel-Lemire parser (Convert floats with Eisel-Lemire when std::from_chars is unavailable #5617)-Wdocumentationandmissing-std-forwardinstring_utils.hpp<memory>inordered_map.hppstd::formatter::parseTests
std::terminate.unit-conversions: expects the more accurate(/0)path when JSON_DIAGNOSTICS is on.get<>(). See the note below.-Wexit-time-destructors,-Wsign-conversion(amd64 only), and smaller clang-tidy 22.1 findings in the tests.ci_infer): 8 new findings, all false positives. They are suppressed per line with@infer-ignoreinstead of extending the type-level baseline in.inferconfig.Verification
Run locally in the CI containers (native arm64):
ci_test_gcc(gcc:latest, full warning set)ci_test_clang_libcxx_cxx11ci_test_diagnosticsci_clang_tidy(silkeh/clang:22 +clang-tools, same as CI)All are clean. The only failures were the
git_requiredFetchContent tests, which fail in Docker because a git worktree can't be cloned there.Tested once on amd64: the CMake 3.5.0 download and checksum, under both Ninja and Makefiles. 3.31.6 and 4.0.0 aren't confirmed yet.
make check-amalgamation: passes.Not reproducible locally: the MSVC/clang-cl changes and whether Infer honors the
@infer-ignoreplacement. They are based on the CI logs; this PR's own CI is the check.Note: strict enums and
operator==operator==(ScalarType, const_reference)isnoexcept, but converting aNLOHMANN_JSON_SERIALIZE_ENUM_STRICTenum can throw, so comparing an out-of-range value with json callsstd::terminate. clang-tidy now reports this. This PR only changes the tests; whether to change the operator is a separate API decision.Public API
No breaking changes. The only behavior change is that arrays built from C++20 range views now have correct parent pointers with
JSON_DIAGNOSTICS. Everything else is casts, pragmas, includes, comments, CI configuration, and tests.🤖 Generated with Claude Code