refactor(quickcheck/splitmix): drop deprecated derive(Show) from RandomState - #4137
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated derive(Show) implementation from quickcheck/splitmix.RandomState and updates the package surface/documentation accordingly, standardizing on @debug.Debug for display/snapshot use and regenerating the public interface.
Changes:
- Remove
Showderivation (and the deprecated-syntax warning suppression) fromRandomState. - Remove
Show-relatedextendpromotions/deprecations fromextends.mbt. - Replace README doctest “string length smoke checks” with deterministic
debug_inspectsnapshots and regeneratepkg.generated.mbtito reflect the new public API.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| quickcheck/splitmix/random.mbt | Drops deprecated derive(Show) and the deprecated-syntax suppression, leaving derive(@debug.Debug). |
| quickcheck/splitmix/extends.mbt | Removes Show-based promoted/hidden extensions now that RandomState no longer implements Show. |
| quickcheck/splitmix/README.mbt.md | Updates doctests from to_string() smoke checks to deterministic debug_inspect snapshots. |
| quickcheck/splitmix/pkg.generated.mbti | Regenerated interface reflecting removal of Show derivation and RandomState::to_string. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…omState `derive(Show)` is deprecated syntax. Remove it (and the `#warnings` suppression) from RandomState, keeping `derive(@debug.Debug)`; the Show impl was only exercised by doctest display smoke checks. Replace those with `debug_inspect` snapshots of the deterministic seeded values. Co-Authored-By: SeekMoon <noreply@moonbitlang.cn>
bobzhang
force-pushed
the
drop-splitmix-show-derive
branch
from
August 24, 2026 05:58
1eea9b1 to
f1b7156
Compare
Collaborator
Coverage Report for CI Build 6311Coverage remained the same at 90.885%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes
derive(Show)— deprecated syntax — fromRandomState, along with the#warnings("-deprecated_syntax")suppression and the#deprecated_syntaxTODO comment. TheShowinstance was only ever used by doctest display smoke checks (rng.to_string().length() > 0), soderive(@debug.Debug)alone suffices.Changes
random.mbt:derive(Show, @debug.Debug)→derive(@debug.Debug); drop suppression + TODO.extends.mbt: remove the promotedShow::{to_string}extend and the deprecated hiddenShow::{output}extend (both required theShowimpl).README.mbt.md: replace the weakinspect(x.to_string().length() > 0, content="true")smoke checks withdebug_inspectsnapshots of the deterministic seeded values (generated viamoon test --update).pkg.generated.mbti: regenerated withmoon info—pub impl ShowandRandomState::to_stringare gone from the public interface.Validation
moon check(module-wide): clean.moon test quickcheck/splitmix: 19/19 passed (includes updated README doctests).moon test quickcheck: 82/82 passed.moon fmt --check quickcheck: clean.Note: removing
RandomState::to_string()/ theShowimpl is a breaking change for any external caller relying on them; this is the migration the prior TODO anticipated.Generated with SeekMoon