• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eclipse-aascw / aas-core-codegen / 35799683348
90%

Build:
DEFAULT BRANCH: main
Ran 23 Sep 2026 12:00AM UTC
Jobs 3
Files 288
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Sep 2026 11:55PM UTC coverage: 87.278% (+0.1%) from 87.18%
35799683348

push

github

web-flow
Compose the C++ JSON serialization (#748)

Every property spelled out its own procedure, and the procedure said
nothing about the property it belonged to. We introduce the pieces it is
made of and let a property be one call.

**A serializer can fail only where a number can be reached from what it
serializes.** JSON holds neither an infinity nor a not-a-number, and an
integer only within [-2^53 + 1, 2^53 - 1]; everything else goes as it
comes. A serializer which can not fail now gives the JSON out plainly,
so neither it nor its caller carries an error which could never be set.

    // no number reachable
    nlohmann::json SerializeReference(
      const types::IReference& that
    );

    // a number is reachable
    std::pair<
      common::optional<nlohmann::json>,
      common::optional<SerializationError>
    > SerializeSomething(
      const types::ISomething& that
    );

This replaces a one-level walk which was wrong in both directions. A
bare ``float`` property routed to a fallible serializer while the walk
looked only for an ``int``, so the class never declared ``error`` and
the generated code did not compile; no fixture caught it,
``primitive_types`` carrying a ``some_int`` beside its ``some_float``.
In the other direction an enumeration, which can not fail, made its
class fallible. The answer is now a fixed point over the whole type
graph, and a JSON-able value counts as reaching a number, since its
shape is known only at run time.

**The error tail is shared.** ``SerializeInto`` marks the path and puts
the value under its key, so a property which can fail is a call and a
check instead of twenty-two lines.

    // before, per fallible property
    common::optional<nlohmann::json> json_semantic_id;
    std::tie(
      json_semantic_id,
      error
    ) = SerializeIClass(
      **maybe_semantic_id
    );
    if (error.has_value()) {
      error->path.segments.emplace_front(
        common::make_unique<iteration::PropertySegment>(
          i... (continued)

185 of 202 new or added lines in 1 file covered. (91.58%)

36963 of 42351 relevant lines covered (87.28%)

2.62 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
95.41
0.77% aas_core_codegen/cpp/lib/_generate_jsonization.py
Jobs
ID Job ID Ran Files Coverage
1 3.12 - 35799683348.1 23 Sep 2026 12:03AM UTC 288
87.28
GitHub Action Run
2 3.10 - 35799683348.2 23 Sep 2026 12:03AM UTC 288
87.28
GitHub Action Run
3 3.11 - 35799683348.3 23 Sep 2026 12:03AM UTC 288
87.28
GitHub Action Run
Source Files on build 35799683348
  • Tree
  • List 288
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3d2dd6cb on github
  • Prev Build on main (#35789133600)
  • Next Build on main (#35802860486)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc