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

moonbitlang / core / 5485 / 1
91%
main: 91%

Build:
DEFAULT BRANCH: main
Ran 23 Jul 2026 04:17AM UTC
Files 434
Run time 9s
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.291% (-0.02%) from 91.307%
5485.1

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>

15913 of 17431 relevant lines covered (91.29%)

188744.13 hits per line

Source Files on job 5485.1
  • Tree
  • List 434
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 5485
  • 3ac9f841 on github
  • Prev Job for on main (#5484.1)
  • Next Job for on main (#5487.1)
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