Skip to content

Re-amalgamate single_include - #5745

Merged
nlohmann merged 2 commits into
developfrom
fix/reamalgamate
Oct 1, 2026
Merged

nlohmann merged 2 commits into
developfrom
fix/reamalgamate

Conversation

@nlohmann

@nlohmann nlohmann commented Oct 1, 2026

Copy link
Copy Markdown
Owner

single_include/nlohmann/json.hpp on develop is stale: forcing make amalgamate on e5a89d6 changes 259 lines. All of it comes from #5737, which changed 13 headers under include/ and merged without the matching amalgamation. The regenerated diff equals git diff b54ed188e e5a89d671 -- include/ (+164/−95), and every spot-checked hunk traces back to #5737 with git log -S. The PRs merged just before it (#5548, #5729, #5731, #5732) updated single_include correctly. json_fwd.hpp and json_literals.hpp were already up to date.

What single_include was missing from #5737:

Why this went unnoticed, and the second commit

#5737 merged 39 seconds after its last push. Its check_amalgamation run was still queued, and earlier runs had been cancelled by the concurrency group, so no failing check was ever reported. check_amalgamation.yml only runs on pull_request, so nothing on develop caught it afterwards either.

The second commit adds push: branches: [develop] to check_amalgamation.yml:

  • in-progress runs are cancelled only for PRs, never for develop
  • the save job (PR number/author) only runs for pull requests
  • the checkout uses github.event.pull_request.head.sha || github.sha
  • comment_check_amalgamation.yml only comments for PR-triggered runs, because push runs have no PR and no pr artifact

A failure on develop then shows up as a red check on the merge commit, with the ready-to-apply amalgamation-patch artifact. This doesn't stop the merge itself; only making the check a required status check would do that. If you'd rather keep the workflow PR-only, drop the second commit.

Public API

No breaking changes. single_include now matches include/.

This PR was written by Claude Code.

🤖 Generated with Claude Code

#5737 changed 13 headers under include/ but merged without the matching
single_include/nlohmann/json.hpp update, so the amalgamated header still
had, among others, the GCC C++20 -Wignored-attributes pragma block and
the clang -Wdocumentation push/pop that #5737 removed, the forwarding
from_json tuple/array helpers it replaced with const references, and
lacked the output_adapter char_traits changes it added.

Regenerated with `make amalgamate` (astyle 3.4.13). The diff is exactly
`git diff b54ed18 e5a89d6 -- include/` (164+/95-); json_fwd.hpp and
json_literals.hpp were already up to date.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
#5737 was merged 39 seconds after its last push, while its own
check_amalgamation run was still queued (earlier runs had been
cancelled by the concurrency group), so the stale single_include
reached develop without any failing check.

Also run the check on pushes to develop, without cancelling in-progress
develop runs. The "save" job (PR number/author for the comment
workflow) only runs for pull requests, the checkout falls back to
github.sha, and comment_check_amalgamation.yml only comments for
PR-triggered runs, since push runs have no PR and no "pr" artifact.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
@nlohmann
nlohmann merged commit e400780 into develop Oct 1, 2026
5 of 161 checks passed
@nlohmann
nlohmann deleted the fix/reamalgamate branch October 1, 2026 06:09
@nlohmann nlohmann added this to the Release 3.13.0 milestone Oct 1, 2026
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.

1 participant