Skip to content

feat(argparse): derive Debug for public types#3477

Merged
bobzhang merged 3 commits intomainfrom
add-debug-argparse
Apr 27, 2026
Merged

feat(argparse): derive Debug for public types#3477
bobzhang merged 3 commits intomainfrom
add-debug-argparse

Conversation

@bobzhang
Copy link
Copy Markdown
Contributor

@bobzhang bobzhang commented Apr 27, 2026

Summary

  • Adds @debug.Debug derive for the public types ArgGroup, Command, FlagAction, FlagArg, OptionAction, OptionArg, PositionArg, ValueRange.
  • Internal Arg, ArgInfo, ArgBuildError also gain Debug so the public struct derives cascade.
  • Part of an audit filling in Debug impls for every public type in core.

Test plan

  • moon test -p moonbitlang/core/argparse passes on all 4 targets (129 tests)

🤖 Generated with Claude Code


Open in Devin Review

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 27, 2026

Coverage Report for CI Build 4017

Coverage remained the same at 94.877%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 15576
Covered Lines: 14778
Line Coverage: 94.88%
Coverage Strength: 211683.09 hits per line

💛 - Coveralls

@bobzhang bobzhang force-pushed the add-debug-argparse branch from 9ea2261 to d95d0e8 Compare April 27, 2026 06:35
@bobzhang bobzhang enabled auto-merge (squash) April 27, 2026 06:42
Adds @debug.Debug derive for ArgGroup, Command, FlagAction, FlagArg,
OptionAction, OptionArg, PositionArg, ValueRange. Internal Arg, ArgInfo
and ArgBuildError also gain Debug so the public structs cascade through
their private fields.
The previous fix duplicated using @debug across 5 files, which the stable
moon toolchain rejects with [4051] 'type Repr is declared twice'. Remove
the duplicates; matches.mbt already has the using declaration.
@bobzhang bobzhang force-pushed the add-debug-argparse branch from d95d0e8 to 3eaab15 Compare April 27, 2026 06:47
@bobzhang bobzhang merged commit 914585f into main Apr 27, 2026
12 of 19 checks passed
@bobzhang bobzhang deleted the add-debug-argparse branch April 27, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants