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

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

Build:
DEFAULT BRANCH: main
Ran 18 Sep 2026 05:29PM 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 05:23PM UTC coverage: 85.863% (-0.02%) from 85.887%
35374092898

push

github

web-flow
Compose the TypeScript JSON de-serialization (#729)

The generated code was long and too verbose. A property is now
one ``let`` and one ``case``, assigned straight into the locals which
the constructor is called with.

The map was there on purpose: a note picked it over a ``switch`` because
a string ``switch`` "is not guaranteed to run in sublinear time". It is
indeed linear, and it still wins at every shape, by a factor of two to
three. Six properties take 53 ns against the map's 189, twenty take 256
against 550, and twenty against an input carrying a hundred unknown keys
on top of them take 1,034 against 1,805. V8 compares interned strings by
pointer, whereas the map paid a megamorphic ``.call`` and a setter
allocated for every instance besides.

Dispatch on the model type is a ``switch`` now for the same two reasons,
which retires all thirteen ``*_FROM_JSONABLE_DISPATCH`` maps: every case
is a call site of its own and hence monomorphic, where the map called
through one site shared by every implementer. It takes between 0.55 and
0.70 of the time of the map, from 5 implementers up to 38.

Every class is split in two. ``parsePropertiesOf{Cls}`` takes a
``JsonObject`` and runs the property loop; the public
``{cls}FromJsonable`` casts, verifies the model type and calls it. A
dispatcher, which has cast and read the model type already in order to
dispatch at all, calls ``parsePropertiesOf{Cls}`` directly, so neither
is done twice on that path. Nothing can re-enter a dispatching function
that way either, which is what used to force a
``{cls}FromJsonableWithoutDispatch`` for a class with concrete
descendants; those are gone.

The model type is verified in front of the loop so that we fail fast: a
wrong one is now reported without de-serializing any of the properties
first.

Nothing else is composed at the point of a call, and there is neither a
combinator tower nor a moniker grammar as on the XML side. A JSON value
is not framed by tags, so ``jsonObject[key... (continued)

117 of 122 new or added lines in 2 files covered. (95.9%)

1 existing line in 1 file now uncovered.

34918 of 40667 relevant lines covered (85.86%)

2.58 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
93.9
-1.31% aas_core_codegen/typescript/lib/_generate_jsonization.py

Coverage Regressions

Lines Coverage ∆ File
1
93.9
-1.31% aas_core_codegen/typescript/lib/_generate_jsonization.py
Jobs
ID Job ID Ran Files Coverage
1 3.11 - 35374092898.1 18 Sep 2026 05:31PM UTC 264
85.86
GitHub Action Run
2 3.10 - 35374092898.2 18 Sep 2026 05:31PM UTC 264
85.86
GitHub Action Run
3 3.12 - 35374092898.3 18 Sep 2026 05:31PM UTC 264
85.86
GitHub Action Run
Source Files on build 35374092898
  • Tree
  • List 264
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 6af1c87f on github
  • Prev Build on main (#35359897208)
  • Next Build on main (#35379277364)
  • 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