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

moonbitlang / core / 5546
91%

Build:
DEFAULT BRANCH: main
Ran 25 Jul 2026 01:44AM UTC
Jobs 1
Files 443
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

25 Jul 2026 01:43AM UTC coverage: 91.256% (-0.02%) from 91.272%
5546

push

github

bobzhang
refactor(extends): uniformly promote compare/eq/hash; deprecate Default

Promotion policy is now driven by where the trait lives (see AGENTS.md):
builtin traits are cycle-free to promote; higher-package traits must use free
functions.

- `Compare::compare`, `Eq::equal`, `Hash::hash` — promoted UNIFORMLY on every
  type that impls them (all builtin traits, no cycle). Exactly one method per
  trait: the user-facing primary one. Their derivatives stay deprecated —
  `Compare::{op_lt,..}` (use `<` `<=` `>=` `>`), `Eq::not_equal` (use `!=`),
  `Hash::hash_combine` (implementer-facing). `compare`/`equal` are still worth
  promoting because they are the required trait methods and the only way to pass
  the operation as a first-class value.
  Tuples get the same promotions but `#doc(hidden)` (the `Tuple(N)::..` names are
  ugly in the interface; the methods still work with no warning).

- `Default::default` — deprecated everywhere (a literal or `Default::default()`
  via the trait is clearer), except `Byte::default` which is kept promoted for
  now because Moon's generated test drivers call it (moonbitlang/moon#1938
  removes that; deprecate once a moon release ships). `Type::default()` call
  sites rewritten to literals (`b'\x00'`, `[]`, `None`, `""`, `0`, ...) or the
  trait form where no clean literal exists.

Operators stay promoted; `Show::to_string` stays canonical-only; ToJson stays
as-is (belongs in @json, would cycle if promoted after the move).
FromJson/Arbitrary/Debug already deprecated.

Verified: `moon check --deny-warn --target all` clean; `moon test --build-only
--deny-warn` green on all four backends; `moon test --target all` green
(6780/6780/6736/6691).

21 of 22 new or added lines in 12 files covered. (95.45%)

3 existing lines in 3 files now uncovered.

15884 of 17406 relevant lines covered (91.26%)

196727.52 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
85.0
0.0% encoding/ascii/decode.mbt

Coverage Regressions

Lines Coverage ∆ File
1
98.23
-0.88% builtin/fixedarray.mbt
1
99.11
-0.89% builtin/string.mbt
1
75.0
-25.0% builtin/unit.mbt
Jobs
ID Job ID Ran Files Coverage
1 5546.1 25 Jul 2026 01:44AM UTC 444
91.27
GitHub Action Run
Source Files on build 5546
  • Tree
  • List 443
  • Changed 56
  • Source Changed 55
  • Coverage Changed 35
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 03944d9d on github
  • Prev Build on main (#5543)
  • Next Build on main (#5549)
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