Repository navigation
Inline ABI namespace jinja2::v2 and its release gates (0076 PR-2) - #604
Conversation
…ce v2 (0076) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ua8ABM1TRsAvso2sWGHFSw
Pure output of scripts/abi_namespace.py; no hand edits. Listed in .git-blame-ignore-revs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ua8ABM1TRsAvso2sWGHFSw
…abidiff (0076) - format-check runs scripts/abi_namespace.py --check - CTest jinja2cpp_abi_namespace: no jinja2 symbol outside v2, no global xyz - test/package: abi_probe_v2 links, abi_probe_v1 (1.x mangling) must not - check_package.cmake checks the installed SONAME; version asserts need major 2 - linux-build: one shared RelWithDebInfo row per standard dumps the ABI with abidw and reports abidiff against the last master build (baselines at the RC, task 0285) - README: Compatibility and versioning; find_package(jinja2cpp 2) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ua8ABM1TRsAvso2sWGHFSw
…anges - gen_html_entities/unicode_case/unicode_tables/unicode_printable emit the inline namespace v2 form, so their --check matches the wrapped headers - abi_report.sh: any change left after --no-added-syms is a break (abidiff reports a changed layout with bit 4, not 8); artifact uploaded on failure - abi_namespace.py rejects spellings it does not rewrite (indented, one-line) - docs/dependencies.md and SBOM name jinja2::v2::detail::xyz Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ua8ABM1TRsAvso2sWGHFSw
MSVC does not implement CWG 2061: reopening namespace detail inside namespace jinja2 declares a new jinja2::detail beside jinja2::v2::detail. containers_api_test and node_arena_test now use the qualified form, and the README tells 1.x detail::Reflector users to do the same. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ua8ABM1TRsAvso2sWGHFSw
|
@codex review @codex security review (the lexer, parser and evaluator files change only by the generated Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c84b543d3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- check_package.cmake reads SOVERSION from CMakeLists.txt instead of using the project major, so a within-2.x SOVERSION bump installs and checks cleanly - abi_report.sh gate fails while the committed baseline's SONAME differs from the library's, so a SOVERSION bump cannot land without its new baseline Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ua8ABM1TRsAvso2sWGHFSw
The merge brought include/jinja2cpp/big_int.h in plain namespace jinja2; scripts/abi_namespace.py wrapped it, which MSVC needs (CWG 2061). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ua8ABM1TRsAvso2sWGHFSw
|
MSVC C++20 shared went red on ede6707 because PR CI builds the merge with master. Train 26 had just added Generated by Claude Code |
One ResourceLimitError (src/engine_errors.h) serves Settings::Limits, named by its field, and the built-in caps, without one; CurrentExceptionToError reports both as ResourceLimitExceeded with the field as extraParams[1] when present, so Render's own catch for it is gone. The built-in sequence cap throws it instead of std::length_error. exception.h, engine_errors.h and error_boundary.h are wrapped in v2 by scripts/abi_namespace.py. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013sRZrdyAGVT1hBgARAkNAE
Requested by Ruslan · project thread
Before: a program compiled against 1.x headers could link against a 2.x library, or the reverse, and fail at run time. Nothing checked the SOVERSION policy.
After: everything in
include/andsrc/lives injinja2::v2, an inline namespace. Users still writejinja2::Value, but the major version is part of every mangled name, so mixing 1.x and 2.x fails at link time. CI checks this four ways: nm, a negative link probe, the installed SONAME, and an abidiff report on one shared build per C++ standard.The tag is written out in the source as
namespace jinja2 { inline namespace v2 {, not hidden behind a macro.scripts/abi_namespace.pywrites it and the format-check job runs it with--check, so the 3.0 retag is one run of the script (plan 0076, sections 1-2).How
c4a0aaf5addsscripts/abi_namespace.py.namespace jinja2opening, skipping comments, literals and raw strings, and wraps the body ininline namespace v2.namespace jinja2::xbecomes three namespaces, because C++17 cannot nest an inline namespace in that form.ae4649c9is pure script output over 90 files, listed in.git-blame-ignore-revs.namespace jinja2lines, re-run the script on the integration branch.a5533287adds the gates:jinja2cpp_abi_namespacefails on any jinja2 symbol outsidev2, or on a globalxyz.test/package:abi_probe_v2must link and run, andabi_probe_v1(1.x mangling) must not link.check_package.cmake: the installed SONAME must carrySOVERSION.find_package(jinja2cpp 2).scripts/abi_report.shcompares that dump with the previous one. Until the RC it only reports, against the last master build.abi/(task 0285). A break then fails unless SOVERSION was bumped and the baseline replaced in the same PR.577860d3: verifier fixes.1c84b543: MSVC fix.ede67072: Codex fixes.c3cc4ff4: merged master (train 26) and re-ran the script, which wrapped the newbig_int.h.Deliberate divergences from the approved plan:
jinja2::v2::detail::xyz,robin_hoodandlexertk.jinja2::v2::detailstays checked, because inline header code calls exported detail functions.--no-added-syms, not only abidiff exit bit 8. abidiff reports a changed layout, such as a newSettingsfield, with bit 4.namespace jinja2 { namespace detail {declares a secondjinja2::detailinstead of reopeningjinja2::v2::detail.detail::Reflectorspecialisations by their qualified name, and the README tells users to do the same.namespace jinja2 { ... }still works on MSVC.Follow-up filed: 0285, commit the ABI baselines at the RC. PR-1 filed 0259, 0260 and 0261. The jbcoe upstream issue is postponed, per Ruslan.
Validation
c4a0aaf5reproducesae4649c9exactly,--checkexits 0, and clang-format is clean.c3cc4ff4: Linux, MSVC, macOS, sanitizers, Conan, fuzz and CodeQL.check_package.cmakepasses 5/5 for static and shared installs. The v1 probe fails with the undefined reference tojinja2::operator==.jinja2::v2symbols and none outsidev2. On the old, untagged library it fails.scripts/preflight.sh --perfpasses, with instruction counts unchanged (±0.04%). The Unicode/HTML generators pass--checkunder Python 3.12.Roles: verifier and ci-triage. The verifier ran 1 round and found 2 blocking issues, both fixed in
577860d3: the generators were out of sync with the wrapped headers, and the abidiff gate missed layout changes.Red CI pushes: 2.
577860d3: MSVC failed on tests that reopenedjinja2::detail(CWG 2061).ede67072: the PR merge ref picked up train 26's newbig_int.hin plainnamespace jinja2, which MSVC rejected and nm and the script check flagged. Fixed byc3cc4ff4.Codex: 2 findings, both P2. 2 fixed in
ede67072, 0 declined:SOVERSION.The requested security review did not start; the code review ran.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ua8ABM1TRsAvso2sWGHFSw