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

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

Build:
DEFAULT BRANCH: main
Ran 18 Sep 2026 09:35PM UTC
Jobs 3
Files 264
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

18 Sep 2026 09:28PM UTC coverage: 85.92% (+0.03%) from 85.895%
35396929406

push

github

web-flow
Compose the TypeScript JSON serialization (#732)

A list-typed property framed its own loop and handed
a ``this``-capturing closure to a shared helper:

    if (that.supplementalSemanticIds !== null) {
      jsonable["supplementalSemanticIds"] = serializeArray(
        that.supplementalSemanticIds,
        (item) => this.transform(item)
      );
    }

while a nested instance went through the three-frame ``this.transform``
even where its declared type already answered which serializer to call:

    if (that.semanticId !== null) {
      jsonable["semanticId"] =
        this.transform(that.semanticId);
    }

Every property is now one statement, and the value is serialized by the
one function of its type:

    if (that.supplementalSemanticIds !== null) {
      jsonable["supplementalSemanticIds"] =
        serialize_ListOf_Reference(that.supplementalSemanticIds);
    }

    if (that.semanticId !== null) {
      jsonable["semanticId"] =
        serializeReference(that.semanticId);
    }

Each concrete class gets a module-level ``serialize{Cls}``, and the
transformer is reduced to one-line overrides forwarding to them, which is
what lets everything else name a serializer directly. ``serializeClass``
is the only dispatch left in the region -- ``that.transform(SERIALIZER)``
-- and it serves an abstract class, a concrete class with descendants and
a named union alike, since the run-time type answers on the writing side
what the reading side has to decide before it has read anything.

``serializeArray`` is gone, and with it the last higher-order call and
every closure: the region now allocates none. A list is composed per
declared item type instead, which is where the writing side parts from
the reading side.

Measured on a synthetic mirror of the generated code -- 38 classes, 1,555
instances per serialization, node 24, each variant in its own process,
median of 15 x 1000 runs:

    today (this.transform + a closure per list)        0.52 - 0.59 ms
    module-l... (continued)

236 of 254 new or added lines in 5 files covered. (92.91%)

35118 of 40873 relevant lines covered (85.92%)

2.58 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
94.07
0.17% aas_core_codegen/typescript/lib/_generate_jsonization.py
4
85.79
1.02% aas_core_codegen/typescript/common.py
1
94.69
-0.01% aas_core_codegen/intermediate/_types.py
Jobs
ID Job ID Ran Files Coverage
1 3.12 - 35396929406.1 18 Sep 2026 09:36PM UTC 264
85.92
GitHub Action Run
2 3.10 - 35396929406.2 18 Sep 2026 09:36PM UTC 264
85.92
GitHub Action Run
3 3.11 - 35396929406.3 18 Sep 2026 09:36PM UTC 264
85.92
GitHub Action Run
Source Files on build 35396929406
  • Tree
  • List 264
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 64669423 on github
  • Prev Build on main (#35393723831)
  • Next Build on main (#35403500086)
  • 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