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

moonbitlang / core / 5485
91%

Build:
DEFAULT BRANCH: main
Ran 23 Jul 2026 04:17AM UTC
Jobs 1
Files 433
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

23 Jul 2026 04:15AM UTC coverage: 91.277% (-0.02%) from 91.293%
5485

push

github

bobzhang
feat(cmp): make trait promotions explicit via extend

Enable `implicit_impl_as_method` (E0079) for the `cmp` package (in its moon.pkg)
and make its trait-impl promotions explicit via `extend`, in a dedicated
cmp/extends.mbt shim.

- Promote (plain `pub extend`): Reverse's Compare::{compare}.
- Deprecate (`#deprecated(..., skip_current_package=true)` + `#doc(hidden)`):
  Reverse's @debug.Debug, Compare operators (op_ge/op_gt/op_le/op_lt), Eq, Hash,
  and the whole Show trait (to_string + output).

Reverse[T] is an ordering wrapper (used like `sort_by_key(x => Reverse(x))`), not
a value you display, so Show is fully deprecated in favour of @debug.Debug -- both
the promotion AND the impl: `Show` is dropped from the derive and replaced by a
`#deprecated pub impl Show for Reverse` (reproducing the `Reverse(inner)`
rendering), so even `Show::to_string`/`inspect` on a Reverse warns. pkg.generated.mbti
gains only Reverse::compare. The Reverse doc/README examples that showed it via
`inspect`/`.to_string()` are migrated to `@debug.debug_inspect`.

The README doc example's local `Person` struct (derive(Debug)) gets an inline
`pub extend Person with Debug::{to_repr}`.

Part of the per-package series (see #3849 for deque). Scoped to cmp/.

Verified: `moon check --deny-warn --target all` clean; `moon test -p cmp --target all` green.

Reviewed by Codex CLI: Reverse Show fully deprecated (impl dropped from derive +
#deprecated manual impl reproducing the rendering, plus deprecated promotion),
all Show usages migrated to debug_inspect, promotes only compare, scoped to cmp/.

Signed-off-by: Codex CLI <codex@openai.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

0 of 3 new or added lines in 1 file covered. (0.0%)

3 existing lines in 1 file now uncovered.

15884 of 17402 relevant lines covered (91.28%)

189058.67 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
86.36
-13.64% cmp/cmp.mbt

Coverage Regressions

Lines Coverage ∆ File
3
86.36
-13.64% cmp/cmp.mbt
Jobs
ID Job ID Ran Files Coverage
1 5485.1 23 Jul 2026 04:17AM UTC 434
91.29
GitHub Action Run
Source Files on build 5485
  • Tree
  • List 433
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3ac9f841 on github
  • Prev Build on main (#5484)
  • Next Build on main (#5487)
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