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

moonbitlang / core / 5263
91%

Build:
DEFAULT BRANCH: main
Ran 22 Jul 2026 04:43AM UTC
Jobs 1
Files 390
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

22 Jul 2026 04:41AM UTC coverage: 91.293%. Remained the same
5263

push

github

web-flow
feat(deque): make trait promotions explicit via extend (#3849)

Enable `implicit_impl_as_method` (E0079) for the `deque` package (in its
moon.pkg) and make its trait-impl promotions explicit via `extend`, in a
dedicated `deque/extends.mbt` shim (promotions listed first, deprecations after,
for easy review):

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

Only `compare` is promoted from Compare; the operator methods stay deprecated
since callers use `<` / `<=` / `>=` / `>`, never `x.op_lt(y)` (they have zero
method callers in the tree). Deque is a collection, so -- like Rust, where
collections implement Debug rather than Display -- Show is deprecated in favor of
@debug.Debug (Deque's Show impl is already #deprecated on main). ToJson is
deprecated in favor of the free `@json.to_json` added in #3850. The deprecated
promotions carry #doc(hidden), so they do not appear in pkg.generated.mbti and
the generated-interface diff only shows the genuinely-new promoted methods
(`add`, `compare`).

Also fixes two doc examples that used now-deprecated promoted methods:
- the `Hash::hash` example (`dq.hash()` -> `Hash::hash(dq)`);
- the `ToJson` example, which was a malformed, never-compiled block (a bare
  `test "..." {` with no ```mbt fence), rewritten as a proper checked
  (`mbt check`) doctest using `@json.to_json(dq)` and `@debug.debug_inspect`
  (Json's Show is deprecated).

First of a per-package series migrating the library off implicit method
promotion (splitting the monolithic #3846 into scoped, reviewable PRs). Scoped to
`deque`; depends only on the free `@json.to_json` from #3850 (now merged).

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

Reviewed by Codex CLI: extends.mbt exactly covers Deque's p... (continued)

15885 of 17400 relevant lines covered (91.29%)

189077.96 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5263.1 22 Jul 2026 04:43AM UTC 391
91.31
GitHub Action Run
Source Files on build 5263
  • Tree
  • List 390
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 1f60c14f on github
  • Prev Build on main (#5260)
  • Next Build on main (#5271)
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