Repository navigation
One nlohmann/json, and the open items brought up to date - #532
Merged
Merged
Conversation
The FetchContent for nlohmann/json is gone, and with it the two nlohmann_json link entries. There never was a compile that used them: llama.cpp carries its own copy at vendor/nlohmann/ and exports that directory through the vendor::nlohmann INTERFACE target which common/CMakeLists.txt links PUBLIC into llama-common, and that directory comes before a FetchContent include dir on every jllama compile line -- measured at the b11556 bump in flags.make, where vendor/nlohmann/.. was -I number 7 and json-src/include number 12. The two project headers that include nlohmann/json.hpp always resolved to upstream's copy, exactly as every upstream TU does. Keeping it that way is the point: one copy in every translation unit. Two copies of the same classes with different layouts in one link is the httplib incident, where the linker's choice per platform decided the behaviour and differed per platform. What made the duplicate indefensible rather than merely idle is that since b11556 upstream applies vendor/nlohmann/json-deep-nesting.patch to its copy, so the fetched v3.12.0 was not even the same code -- it cost a clone per fresh build directory, two link entries and a pinned tag that looked like something to keep in sync with a library this project does not choose the version of. A configure-time guard replaces it, beside the aligned-free check: upstream's header must be where the include path expects it. It is asserted rather than left to the compiler because a missing header fails every TU with a message about the header, while this one names the expected location and says what to do -- and says explicitly what not to do, namely re-add a FetchContent, which would put a second, differently-patched copy back on the path. The case it catches is a future upstream move of vendor/nlohmann/. Verification, and its limit. The chain is confirmed at the exact pinned tag b11558: vendor/nlohmann/json.hpp is there, vendor/nlohmann/CMakeLists.txt exports the vendor root with target_include_directories(nlohmann INTERFACE ..) and upstream's own comment says it is so consumers can include <nlohmann/json.hpp>, and common/CMakeLists.txt links vendor::nlohmann PUBLIC into llama-common, which jllama links. No local compile: this build tree is from b11556 while the pin is b11558, so a reconfigure stops at the patch applier's own configure-into-a-fresh-directory refusal. The failure mode is loud on every platform, and the guard turns it into a configure error. TODO.md is brought up to date, since three statements in it had been overtaken. The header no longer says partly proven: two consecutive dispatch runs on main finished completely green through package, all six smokes and the publish chain. The cuda13 item is no longer merely mitigated but verified on the same hardware -- same AMI, same driver, same T4, three exit-134 aborts became three clean runs. The openvino item carried 172x, and the measured figure on Intel hardware is 336x. Three things are added. The four defects in the published artefact set, found by comparing the first green snapshot against natives.csv and against Central and fixed in #529/#531, with the live verification afterwards (208 assets down to 98, 49 artefacts with 49 signatures, 23 of 23 natives jars, llama-platform present) and the note that item 4 still applies to the three sibling repos, where those two jobs are shared. A prepared plan for the four upstream issues that have no patch to offer -- title, the evidence to paste and the question for the maintainers, one row each, with the rule to state the measurement and ask rather than propose a fix in code this project does not own. And a section on waiting for sccache: 0.18.0 is the newest release, the -Xclang refusal is tracked in four open issues of which #1122 is the structural one, and the cost is measured -- 719 of 720 requests non-cacheable on the Windows clang job and every HIP TU refused on the ROCm job, which is the critical path at 2:40 to 3:08 h against about an hour for the rest of a run combined. check-natives.py 0 disagreements, check-patches.py 12 patches and 99 hunks clean, 122 buildcheck tests green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G
bernardladenthin
had a problem deploying
to
maven-central
October 12, 2026 17:06 — with
GitHub Actions
Failure
bernardladenthin
had a problem deploying
to
maven-central
October 12, 2026 17:06 — with
GitHub Actions
Failure
|
This branch had an error being deployed
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.



The FetchContent for nlohmann/json is gone
There never was a compile that used it. llama.cpp carries its own copy at
vendor/nlohmann/andexports that directory through the
vendor::nlohmannINTERFACE target, whichcommon/CMakeLists.txtlinks PUBLIC into
llama-common— and that directory comes before a FetchContent include dir onevery
jllamacompile line. Measured at the b11556 bump inflags.make:vendor/nlohmann/..was-Inumber 7,json-src/includenumber 12.So the two project headers that include
nlohmann/json.hppalways resolved to upstream's copy, exactlyas every upstream TU does.
Keeping it that way is the point: one copy in every translation unit. Two copies of the same
classes with different layouts in one link is the httplib incident — the linker's choice per platform
decided the behaviour, and it differed per platform.
What made the duplicate indefensible rather than merely idle: since b11556 upstream applies
vendor/nlohmann/json-deep-nesting.patchto its copy, so the fetchedv3.12.0was not even the samecode. It cost a clone per fresh build directory, two link entries, and a pinned tag that looked like
something to keep in sync with a library this project does not choose the version of.
A configure-time guard replaces it
Beside the aligned-free check. Asserted rather than left to the compiler: a missing header fails every
TU with a message about the header, while this one names the expected location, says what to do —
and says explicitly what not to do, namely re-add a FetchContent, which would put a second,
differently-patched copy back on the path. The case it catches is a future upstream move of
vendor/nlohmann/.Verification, and its limit
Confirmed at the exact pinned tag b11558:
vendor/nlohmann/json.hpp→ HTTP 200target_include_directories(nlohmann INTERFACE ..), with upstream's own comment "so consumers can include via<nlohmann/json.hpp>"jllamacommon/CMakeLists.txt:137linksvendor::nlohmannPUBLIC intollama-common(TARGETisllama-commonfrom line 54)No local compile. This build tree is from b11556 while the pin is b11558, so a reconfigure stops at
the patch applier's own "configure into a fresh build directory" refusal. The failure mode is loud on
every platform, and the guard turns it into a configure error — but CI is the proof, not this PR.
TODO.mdbrought up to dateThree statements had been overtaken:
main, throughpackage, all six smokes and the publish chaincuda13itemexit 134aborts became three clean runsopenvinoitemThree things added
1. The four defects in the published artefact set. Found by comparing the first green snapshot
against
natives.csvand against Central — Central was correct, the GitHub release was not: no*.pomat all (sollama-platformwas absent entirely), unsigned AARs, a signature check that globbed*.jaronly, and 208 accumulated assets. Fixed in #529/#531 and verified on the live releaseafterwards: 208 → 98 assets, 49 artefacts with 49 signatures, 23 of 23 natives jars,
llama-platformpresent. With the note that item 4 still applies to the three sibling repos, wherethose two jobs are shared.
2. A prepared plan for the four upstream issues that have no patch to offer — title, the evidence to
paste and the question for the maintainers, one row each. With the rule for the day: state the
measurement and ask, do not propose a fix in code this project does not own.
3. Waiting on sccache.
0.18.0is the newest release, and the-Xclangrefusal is tracked in fouropen issues — #1122 is the structural one. The cost is measured: 719 of 720 requests
non-cacheable on the Windows clang job, and every HIP TU refused on the ROCm job, which is the
critical path at 2:40–3:08 h against about an hour for the rest of a run combined. A re-check trigger
(the next sccache release, read the hit table in the job summary) rather than a schedule.
Verification
check-natives.py0 disagreements,check-patches.py12 patches / 99 hunks clean, 122 buildchecktests green.
🤖 Generated with Claude Code
https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G