Skip to content

refactor: clean up @alert deprecated pragmas #2001

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Yoorkin
Copy link
Collaborator

@Yoorkin Yoorkin commented Apr 25, 2025

Clean up pragmas, except for @alert unsafe (requires the #internal attribute).

Copy link

peter-jerry-ye-code-review bot commented Apr 25, 2025

Inconsistent deprecation documentation in builtin/builtin.mbti

Category
Maintainability
Code Snippet
type ArrayView[T] //deprecated
Recommendation
Replace inline comment with the new attribute syntax: #deprecated("use @array.View instead")
Reasoning
The deprecation notice in builtin.mbti uses an inline comment instead of the new attribute syntax. This inconsistency could lead to tools missing the deprecation notice, and loses the specific migration message present in the implementation file.

Similar inconsistency in strconv/strconv.mbti

Category
Maintainability
Code Snippet
type Decimal //deprecated
Recommendation
Replace inline comment with: #deprecated("Decimal will be changed to private. Use @strconv.parse_double instead")
Reasoning
The same inconsistency exists in strconv.mbti. The interface file should maintain the same deprecation message as the implementation for better developer guidance.

Incomplete deprecation message propagation

Category
Correctness
Code Snippet
fn to_double(Decimal) -> Double!StrConvError //deprecated
Recommendation
Add complete deprecation message that guides users to the alternative method
Reasoning
When deprecating functionality, it's important to provide clear migration paths. The deprecation notice should include information about the replacement functionality to help users upgrade their code.

@coveralls
Copy link
Collaborator

coveralls commented Apr 25, 2025

Pull Request Test Coverage Report for Build 6472

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 92.7%

Totals Coverage Status
Change from base Build 6470: 0.0%
Covered Lines: 6121
Relevant Lines: 6603

💛 - Coveralls

@bobzhang bobzhang force-pushed the clean-up-alert-deprecated branch from 8bc52e1 to 5c78825 Compare April 25, 2025 15:52
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.

2 participants