FFFF Move deprecated code into dedicated files by bobzhang · Pull Request #2365 · moonbitlang/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Move deprecated code into dedicated files #2365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bobzhang
Copy link
Contributor

Summary

  • follow repo guidelines by storing deprecated functions in deprecated.mbt
  • move Array::push_iter to array/deprecated.mbt
  • create immut/priority_queue/deprecated.mbt and move pop_exn
  • add strconv/deprecated.mbt for deprecated Decimal APIs

Testing

  • moon info
  • moon fmt
  • moon check
  • moon test

https://chatgpt.com/codex/tasks/task_e_685dd942d14483209bd614490082cd9a

@bobzhang bobzhang enabled auto-merge (rebase) June 27, 2025 03:38
@coveralls
Copy link
Collaborator
coveralls commented Jun 27, 2025

Pull Request Test Coverage Report for Build 98

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.361%

Totals Coverage Status
Change from base Build 97: 0.0%
Covered Lines: 3452
Relevant Lines: 3863

💛 - Coveralls

@bobzhang bobzhang force-pushed the u1m4of-codex/group-deprecated-functions-into-deprecated.mbt branch from ad07856 to 40345af Compare June 27, 2025 03:52
@bobzhang bobzhang force-pushed the u1m4of-codex/group-deprecated-functions-into-deprecated.mbt branch from 40345af to e4162ae Compare June 27, 2025 05:10
Copy link
Function `parse_decimal_priv` is still using the deprecated `parse_decimal_from_view` directly

Category
Maintainability
Code Snippet
fn parse_decimal_priv(str : String) -> Decimal raise StrConvError {
parse_decimal_from_view(str.view())
}
Recommendation
Consider renaming parse_decimal_from_view to parse_decimal_from_view_priv to maintain consistent private function naming
Reasoning
Following the pattern of other private functions (e.g. new_priv, from_int64_priv), internal functions should have the _priv suffix for consistency

Missing version number in deprecation notices

Category
Maintainability
Code Snippet
#deprecated("use method call")
pub fnalias Array::push_iter
Recommendation
Add version information to deprecation notices, e.g. #deprecated("use method call since v1.2.0")
Reasoning
Version information helps users understand when APIs were deprecated and plan migration timelines accordingly

Inconsistent doc comment style

Category
Maintainability
Code Snippet
///| Adds a value to the immutable priority queue.

/// # Example
Recommendation
Keep consistent spacing after ///| markers:
///|
/// Adds a value to the immutable priority queue.
Reasoning
Consistent documentation style improves readability and maintains professional code quality

@bobzhang bobzhang merged commit a0c2765 into main Jun 27, 2025
10 checks passed
@bobzhang bobzhang deleted the u1m4of-codex/group-deprecated-functions-into-deprecated.mbt branch June 27, 2025 05:14
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
0