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

eclipse-aascw / aas-core-codegen / 34741996127
85%

Build:
DEFAULT BRANCH: main
Ran 13 Sep 2026 06:13AM UTC
Jobs 3
Files 269
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

13 Sep 2026 06:07AM UTC coverage: 85.249% (+0.007%) from 85.242%
34741996127

push

github

web-flow
Compose the C# XML de-serialization out of readers (#686)

The generated ``xmlization.cs`` repeated itself at three levels. Every
property of every concrete class inlined its whole reading procedure into
its own ``case`` block -- the self-closing check, the end-of-file check,
the ``try``/``catch`` around the conversion, an error message naming that
property and its class, the ``PrependSegment`` marking the path, and, for
a list or a tuple, the loop or the positional ``<v>`` elements on top.
Every concrete class then got its own ``...FromElement`` function, and all
of those were the same 43 lines with four tokens substituted in. And every
``...FromSequence`` re-emitted the ~70 lines of framing around its property
loop, which said nothing about the class it belonged to.

Everything is now read through one composable shape, and the pieces that
do not vary are generated once:

    case "category":
        theCategory = ReadString(
            reader, isEmptyProperty, out error);
        break;

The rationale and the design:

* **One shape for every reader.** Reading a property's content, a list
  item's and a tuple item's are the same operation at different nesting
  depths, so they are one delegate:

      private delegate T ContentReader<T>(
          Xml.XmlReader reader, bool isEmpty, out Reporting.Error? error);

  Because the shape is uniform a reader can be an argument to another
  reader, so a list of tuples -- or anything deeper the meta-model may
  grow -- falls out of the existing pieces instead of needing a generated
  helper per combination.

* **A plain ``T`` return, not ``T?`` and not ``out T``.** Failure travels
  in the error alone and the value is then ``default!``, which the caller
  never reads. ``T?`` would have split the machinery in two, since
  a nullable return is ``Nullable<T>`` for a value type but a nullable
  reference otherwise and no unconstrained parameter covers both. ``out T``
  would have compiled, but ``out`` is invaria... (continued)

204 of 210 new or added lines in 1 file covered. (97.14%)

2 existing lines in 1 file now uncovered.

33929 of 39800 relevant lines covered (85.25%)

2.56 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
92.84
0.53% aas_core_codegen/csharp/lib/_generate_xmlization.py

Coverage Regressions

Lines Coverage ∆ File
2
92.84
0.53% aas_core_codegen/csharp/lib/_generate_xmlization.py
Jobs
ID Job ID Ran Files Coverage
1 3.12 - 34741996127.1 13 Sep 2026 06:15AM UTC 269
85.25
GitHub Action Run
2 3.10 - 34741996127.2 13 Sep 2026 06:15AM UTC 269
85.25
GitHub Action Run
3 3.11 - 34741996127.3 13 Sep 2026 06:15AM UTC 269
85.25
GitHub Action Run
Source Files on build 34741996127
  • Tree
  • List 269
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • cc1bacf8 on github
  • Prev Build on main (#34493800065)
  • Next Build on main (#34750135279)
  • 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