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

moonbitlang / core / 6266
91%

Build:
DEFAULT BRANCH: main
Ran 21 Aug 2026 07:16AM UTC
Jobs 1
Files 452
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

21 Aug 2026 07:13AM UTC coverage: 90.793% (+0.002%) from 90.791%
6266

push

github

web-flow
feat(hashmap): add FromJson impl for HashMap[String, V] to match Map (#3584)

`HashMap` could be serialized to JSON but not read back: `ToJson` has
been there for a while and `FromJson` never landed, so a map could make
a round trip in one direction only. `Map`, `SortedMap` and
`@immut/sorted_map` all carry the object-decoding impl already; this
brings `HashMap` in line with them.

The impl follows `@sorted_map`'s exactly -- an object is required, each
member is decoded with `V`'s impl, and the path is extended with the
member's key so a failure names the entry rather than the whole object.
Since the object's size is known up front, the table is sized once
instead of rehashing as the entries go in.

Restricting the key to `String` matches every other map impl in core.
`ToJson` accepts any `K : Show`, so a round trip is only guaranteed for
`String` keys, which is the same asymmetry `Map` has.

Tests cover a generated round trip, an empty object, nested values, a
non-object input, and the decode path reported when one member fails --
replacing `path.add_key(k)` with `path` fails that last test.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

5 of 5 new or added lines in 1 file covered. (100.0%)

16597 of 18280 relevant lines covered (90.79%)

305982.62 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6266.1 21 Aug 2026 07:16AM UTC 453
90.81
GitHub Action Run
Source Files on build 6266
  • Tree
  • List 452
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 220d4630 on github
  • Prev Build on main (#6264)
  • Next Build on main (#6269)
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