Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .agents/docs/2026-07-08-index-side-adoption-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ the pin reaches 0.0.85, new-grammar descriptors cannot merge).

---

## PROGRESS (live)

| Item | Status | Where |
|---|---|---|
| P0 merge PR #63 | pending maintainer decision (per instruction, PR untouched) | |
| P1 floor + strict lint | ✅ prepared — commit 2523dd9 on `feat/index-floor-0.0.85` (push/PR gated on the v0.0.85 release assets existing, else lint's mcpp download 404s) | index.toml, validate.yml (pin 0.0.85 + xpkg parse step), publish script cp, docs |
| P2 fmt → scan_overrides | ✅ validated locally only; descriptor kept out of tree per instruction | build+test green incl. negative ddi-audit case |
| P3 long-bracket migrations | ✅ prepared — commit 7f1e624 on `feat/long-bracket-migrations` (stacked on P1) | parity-oracle byte-identical; nlohmann.json + eigen member tests green |
| P4 docs | ✅ folded into P1 commit (schema rows + floor section) | docs/repository-and-schema.md |

Note: the corpus dry-run of strict lint over all 42 descriptors surfaced and
fixed three mcpp-side gaps (single-quoted version keys — real bug hiding
tensorvia's versions; platform sub-table keys; Form A descriptors) — exactly
the bug class D2 exists to catch.

## P0 — merge PR #63 as-is (pre-train)

fmt 12.2.0 via `generated_files` works on today's 0.0.81 (verified locally
Expand Down
4 changes: 3 additions & 1 deletion pkgs/c/compat.eigen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ package = {
include_dirs = { "*" },
-- Header-only: a trivial anchor TU gives mcpp a buildable lib target.
generated_files = {
["mcpp_generated/eigen_anchor.c"] = "int mcpp_compat_eigen_headers_anchor(void) { return 0; }\n",
["mcpp_generated/eigen_anchor.c"] = [==[
int mcpp_compat_eigen_headers_anchor(void) { return 0; }
]==],
},
sources = { "mcpp_generated/eigen_anchor.c" },
targets = { ["eigen"] = { kind = "lib" } },
Expand Down
47 changes: 46 additions & 1 deletion pkgs/n/nlohmann.json.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,52 @@ package = {
-- Upstream's official module unit (develop @ src/modules/json.cppm),
-- reproduced verbatim. Verdir-relative path, no glob.
generated_files = {
["mcpp_generated/nlohmann.json.cppm"] = "module;\n\n// GCC workaround for C++ modules support.\n// When using C++20 modules, some compilers (particularly GCC) may have issues\n// with template instantiations in the module preamble. If you encounter\n// \"redefinition\" errors when including nlohmann/json.hpp, try one of:\n// 1. Include nlohmann/json.hpp in your module preamble BEFORE other #includes\n// 2. Or use: import nlohmann.json; instead of #include <nlohmann/json.hpp>\n// 3. Or upgrade to a newer GCC version with better modules support.\n// See: https://github.com/nlohmann/json/issues/5103\n\n#include <nlohmann/json.hpp>\n\nexport module nlohmann.json;\n\nexport\nNLOHMANN_JSON_NAMESPACE_BEGIN\n\nusing NLOHMANN_JSON_NAMESPACE::adl_serializer;\nusing NLOHMANN_JSON_NAMESPACE::basic_json;\nusing NLOHMANN_JSON_NAMESPACE::json;\nusing NLOHMANN_JSON_NAMESPACE::json_pointer;\nusing NLOHMANN_JSON_NAMESPACE::ordered_json;\nusing NLOHMANN_JSON_NAMESPACE::ordered_map;\nusing NLOHMANN_JSON_NAMESPACE::to_string;\n\ninline namespace literals\n{\ninline namespace json_literals\n{\n using NLOHMANN_JSON_NAMESPACE::literals::json_literals::operator\"\"_json;\n using NLOHMANN_JSON_NAMESPACE::literals::json_literals::operator\"\"_json_pointer;\n} // namespace json_literals\n} // namespace literals\n\n// Note: the following nlohmann::detail symbols must be exported due to\n// an MSVC bug failing to compile without these symbols visible (ticket #3970)\nnamespace detail\n{\n using NLOHMANN_JSON_NAMESPACE::detail::json_sax_dom_callback_parser;\n using NLOHMANN_JSON_NAMESPACE::detail::unknown_size;\n} // namespace detail\n\nNLOHMANN_JSON_NAMESPACE_END\n",
["mcpp_generated/nlohmann.json.cppm"] = [==[
module;

// GCC workaround for C++ modules support.
// When using C++20 modules, some compilers (particularly GCC) may have issues
// with template instantiations in the module preamble. If you encounter
// "redefinition" errors when including nlohmann/json.hpp, try one of:
// 1. Include nlohmann/json.hpp in your module preamble BEFORE other #includes
// 2. Or use: import nlohmann.json; instead of #include <nlohmann/json.hpp>
// 3. Or upgrade to a newer GCC version with better modules support.
// See: https://github.com/nlohmann/json/issues/5103

#include <nlohmann/json.hpp>

export module nlohmann.json;

export
NLOHMANN_JSON_NAMESPACE_BEGIN

using NLOHMANN_JSON_NAMESPACE::adl_serializer;
using NLOHMANN_JSON_NAMESPACE::basic_json;
using NLOHMANN_JSON_NAMESPACE::json;
using NLOHMANN_JSON_NAMESPACE::json_pointer;
using NLOHMANN_JSON_NAMESPACE::ordered_json;
using NLOHMANN_JSON_NAMESPACE::ordered_map;
using NLOHMANN_JSON_NAMESPACE::to_string;

inline namespace literals
{
inline namespace json_literals
{
using NLOHMANN_JSON_NAMESPACE::literals::json_literals::operator""_json;
using NLOHMANN_JSON_NAMESPACE::literals::json_literals::operator""_json_pointer;
} // namespace json_literals
} // namespace literals

// Note: the following nlohmann::detail symbols must be exported due to
// an MSVC bug failing to compile without these symbols visible (ticket #3970)
namespace detail
{
using NLOHMANN_JSON_NAMESPACE::detail::json_sax_dom_callback_parser;
using NLOHMANN_JSON_NAMESPACE::detail::unknown_size;
} // namespace detail

NLOHMANN_JSON_NAMESPACE_END
]==],
},
sources = { "mcpp_generated/nlohmann.json.cppm" },
targets = { ["nlohmann_json"] = { kind = "lib" } },
Expand Down
Loading