Skip to content

tentative to deprecate push_iter as function #2141

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 4 commits into
base: main
Choose a base branch
from

Conversation

bobzhang
Copy link
Contributor

No description provided.

Copy link

peter-jerry-ye-code-review bot commented May 21, 2025

Inconsistent use of type annotations between Array[T] and Self[T]

Category
Maintainability
Code Snippet
pub fn[T] Array::push_iter(self : Self[T], iter : Iter[T]) -> Unit
Recommendation
Consider using Self[T] consistently across the codebase for method definitions or stick with Array[T] if that's the project convention
Reasoning
Using consistent type annotations improves code readability and maintains a uniform style across the codebase. The choice between Self[T] and Array[T] should be consistent with other method implementations in the module.

Deprecated function alias could include migration instructions

Category
Maintainability
Code Snippet
#deprecated("use method call")
Recommendation
Enhance the deprecation message with a specific example: #deprecated("use array.push_iter(iter) instead of push_iter(array, iter)")
Reasoning
More specific deprecation messages help developers understand exactly how to migrate their code to the new style, reducing confusion and speeding up the deprecation process.

Documentation comment style could be more consistent

Category
Maintainability
Code Snippet
///|
#deprecated("use method call")
pub fnalias Array::push_iter
Recommendation
Consider combining the ///| marker with the deprecation notice in the documentation comment
Reasoning
Keeping all metadata and documentation for a function together makes it easier to maintain and understand the code's documentation state.

@coveralls
Copy link
Collaborator

coveralls commented May 21, 2025

Pull Request Test Coverage Report for Build 7201

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

Totals Coverage Status
Change from base Build 7198: 0.0%
Covered Lines: 8549
Relevant Lines: 9184

💛 - Coveralls

@bobzhang bobzhang enabled auto-merge (rebase) June 11, 2025 06:16
auto-merge was automatically disabled June 11, 2025 06:27

Rebase failed

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.

3 participants