Skip to content

[codex] Add Debug support for common types#250

Merged
peter-jerry-ye merged 1 commit into
mainfrom
codex/add-debug-common-types
Jun 2, 2026
Merged

[codex] Add Debug support for common types#250
peter-jerry-ye merged 1 commit into
mainfrom
codex/add-debug-common-types

Conversation

@peter-jerry-ye
Copy link
Copy Markdown
Collaborator

@peter-jerry-ye peter-jerry-ye commented Jun 1, 2026

Summary

  • Add Debug support for common value types across uuid, stack, decimal, time, path, encoding, and json5.
  • Use structural custom Debug representations for opaque/common value types so debug diffs preserve constructors, arrays, and labeled fields instead of plain formatted strings.
  • Add blackbox debug_inspect coverage and regenerate pkg.generated.mbti interfaces.

Validation

  • moon fmt
  • moon check
  • moon info
  • moon test (546 passed)
  • git diff --check

@peter-jerry-ye peter-jerry-ye marked this pull request as ready for review June 1, 2026 09:18
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 81d2496776

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread time/zone.mbt Outdated

///|
pub impl Debug for Zone with fn to_repr(self : Zone) -> Repr {
Repr::ctor("Zone", [(None, Repr::string(self.to_string()))])
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include offsets in Zone debug output

Because this Debug impl only uses the zone id, distinct zones can render identically: for example utc_zone and fixed_zone("UTC", 3600) both debug as Zone("UTC") even though fixed_zone accepts an arbitrary id and offset. That makes debug_inspect assertions unable to catch wrong fixed offsets or loaded TZ data when the id matches; include the offset data (and transitions for non-fixed zones) in the repr so the debug value reflects the actual zone being tested.

Useful? React with 👍 / 👎.

@peter-jerry-ye peter-jerry-ye force-pushed the codex/add-debug-common-types branch 2 times, most recently from 362e875 to 47b9769 Compare June 1, 2026 09:44
@peter-jerry-ye peter-jerry-ye force-pushed the codex/add-debug-common-types branch from 47b9769 to 5655bd6 Compare June 2, 2026 07:03
@peter-jerry-ye peter-jerry-ye merged commit 51845b0 into main Jun 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant