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

moonbitlang / core / 4043

27 Apr 2026 08:50AM UTC coverage: 94.817% (-0.06%) from 94.878%
4043

push

github

web-flow
fix(coverage): break import cycle with debug (#3491)

`coverage/debug.mbt` (added in #3482) introduced a `Debug` impl for
`CoverageCounter`, which made `coverage` import `debug`. With
`--enable-coverage`, the toolchain implicitly injects coverage into
every package — including `debug` itself — producing the cycle:

    abort -> prelude -> coverage -> debug -> coverage

This causes `moon test --enable-coverage` (and the misc-check CI job)
to fail with "Import loop detected".

Removes `coverage/debug.mbt` and the `debug` import from
`coverage/moon.pkg`. The only observable API change is that
`CoverageCounter` no longer has a `Debug` impl — it's an internal
counter type that callers shouldn't be debug-printing in normal code.

After this change `moon test --enable-coverage` runs clean (6369/6369).

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

14781 of 15589 relevant lines covered (94.82%)

220117.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.61
/debug/debug.mbt


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc