Skip to content

CJM v0.3.6

Latest

Choose a tag to compare

@lmingzhi618 lmingzhi618 released this 26 Jul 22:04
4e59acf

CJM v0.3.6 Release Notes

CJM v0.3.6 promotes the Tree-sitter C++ frontend from research spike to the
default production parser path for the current practical syntax surface.

This release does not expand the Metadata IR or generated JSON behavior. Its
purpose is to make the parser foundation stronger while preserving the v0.3
public workflow.

Highlights

  • Uses a Tree-sitter-backed C++ frontend by default for CLI and CMake generation
  • Preserves the existing SourceFileSyntax boundary into Semantic Analysis
  • Keeps Tree-sitter implementation details inside the C++ frontend layer
  • Adds parser parity coverage for the supported v0.3 syntax surface
  • Fails closed for unsupported managed declarations that Tree-sitter can parse
    but CJM does not yet support semantically
  • Registers Tree-sitter smoke and adapter tests in the normal test suite
  • Keeps generated output compatible with existing golden tests

What Changed For Users

The user-facing workflow remains the same:

cjm generate --input model.hpp --output model.cjm.hpp

and:

cjm_generate(
  TARGET app
  HEADERS model.hpp
)

Users do not need the Tree-sitter CLI, Node.js, Rust, npm, Cargo, or Python to
build or use CJM.

Parser Behavior

CJM still accepts only its documented practical subset. Tree-sitter can parse
far more C++ than CJM supports, so the adapter is intentionally strict.

Supported managed fields continue to use same-line JSON metadata:

struct User {
    std::string name; // json:"name"
};

Unsupported managed forms are rejected instead of being silently misread.
Ordinary C++ members without CJM json:"..." metadata remain outside CJM's
managed model surface and are ignored by the adapter when they are not needed
for metadata extraction.

Verification

The release branch was verified with:

cmake --build build
ctest --test-dir build --output-on-failure

Expected result:

100% tests passed, 0 tests failed out of 21

Coverage includes:

  • Tree-sitter adapter tests
  • Tree-sitter smoke tests
  • parser tests
  • semantic tests
  • generator golden tests
  • CLI tests
  • generated compile tests
  • basic example build/run tests

Known Limitations

v0.3.6 remains a practical subset release.

Not yet supported:

  • arbitrary JSON values
  • std::variant
  • std::any
  • pointer fields
  • polymorphism
  • custom converters
  • enum string mapping policies
  • time and datetime mappings
  • automatic header discovery
  • full C++ grammar support
  • multiline managed field declarations are not yet documented as supported
  • private fields
  • native JSON backend
  • install/package distribution

Tag

Release tag:

v0.3.6