[codex] replace derived Show impls and deprecate weak Show cases#3452
Draft
peter-jerry-ye wants to merge 2 commits into
Draft
[codex] replace derived Show impls and deprecate weak Show cases#3452peter-jerry-ye wants to merge 2 commits into
peter-jerry-ye wants to merge 2 commits into
Conversation
Collaborator
Coverage Report for CI Build 3895Coverage decreased (-0.1%) to 94.762%Details
Uncovered Changes
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
This PR removes live
derive(Show)usage from the affected core packages and replaces each one with an explicit standaloneimpl Show.It also removes the
#warnings("-deprecated_syntax")suppressions that were masking those definitions, regenerates the affected.mbtifiles, and deprecates the newShowimpls whose output should not be treated as stable API.What Changed
derive(Show)definitions with explicitimpl ShowShowforRandomState,FlagAction, andOptionActionShownon-deprecated for intentional string forms such asFailure,JsonDecodeError,Reverse,ValueRange, andValueSourcequickcheck/splitmixREADME to stop demonstratingRandomState::to_string()pkg.generated.mbtifilesWhy
The repo still had a small set of
derive(Show)sites that depended on deprecated syntax, and some of those sites were shielded by local warning suppressions.Converting them to explicit impls makes the behavior visible in ordinary source, removes reliance on deprecated syntax, and exposes any remaining issues directly. The follow-up deprecations keep weak or incidental string representations from becoming encouraged public API.
Impact
impl Showentries instead ofderive(Show)in generated interfacesRandomState,FlagAction, orOptionActionwill now see deprecation metadataValidation
moon infomoon fmtmoon checkmoon test argparse json builtin cmp quickcheck/splitmixmoon test argparse quickcheck/splitmix