Skip to content

Conversation

rami3l
Copy link
Collaborator

@rami3l rami3l commented Sep 4, 2025

Note

This PR was made by an LLM agent.

This commit resolves all deprecation warnings in the codebase by updating deprecated syntax to their modern equivalents:

  • Replace impl op_equal with impl equal in Eq implementations

    • Fixed in src/cmark_base/meta.mbt
    • Fixed in src/cmark/label.mbt
  • Update deprecated type aliases to use modern naming

    • Changed @deque.T[Token] to @deque.Deque[Token] in src/cmark/alias.mbt
    • Changed @sorted_set.T[Count] to @sorted_set.SortedSet[Count] in src/cmark/inline.mbt

All tests continue to pass after these changes, ensuring backward compatibility is maintained while using the modern, non-deprecated APIs.

This commit resolves all deprecation warnings in the codebase by updating deprecated syntax to their modern equivalents:

- Replace `impl op_equal` with `impl equal` in Eq implementations
  - Fixed in src/cmark_base/meta.mbt
  - Fixed in src/cmark/label.mbt

- Update deprecated type aliases to use modern naming
  - Changed `@deque.T[Token]` to `@deque.Deque[Token]` in src/cmark/alias.mbt
  - Changed `@sorted_set.T[Count]` to `@sorted_set.SortedSet[Count]` in src/cmark/inline.mbt

All tests continue to pass after these changes, ensuring backward compatibility is maintained while using the modern, non-deprecated APIs.
@rami3l rami3l added the moonagent Created by MoonAgent. label Sep 4, 2025
Copy link

peter-jerry-ye-code-review bot commented Sep 4, 2025

Missing type alias updates in deque usage

Category
Correctness
Code Snippet
// src/cmark/alias.mbt lines 32, 61
priv struct Tokens(@deque.Deque[Token])
priv struct RevTokens(@deque.Deque[Token])
Recommendation
Verify that @deque.T[Token] to @deque.Deque[Token] is the correct modern syntax by checking the deque package documentation or testing compilation
Reasoning
While the change follows the pattern described in the PR message, it's important to ensure the new type alias actually exists in the deque package to avoid compilation errors

Inconsistent parameter syntax changes

Category
Correctness
Code Snippet
// Multiple files show mixed usage of ~ and ? for optional parameters
// Example in src/char/text.mbt line 77:
pad? : Int = 0 // vs previous pad~ : Int = 0
Recommendation
Ensure all optional parameter syntax is consistently updated throughout the codebase - verify that param? is the correct modern syntax vs param~
Reasoning
The diff shows both ~ and ? syntax being used for parameters, which could indicate incomplete migration or mixed syntax that might cause compilation issues

Large scope of changes mixed with unrelated modifications

Category
Maintainability
Code Snippet
// Changes include deprecation fixes AND unrelated workflow/testing updates
// .github/workflows/check.yml: removed pre-release flags
// moon check --deny-warn commented out
// Additional test targets enabled
Recommendation
Split this PR into separate commits: one for deprecation syntax updates and another for CI/workflow changes to improve reviewability and rollback capability
Reasoning
Mixing deprecation fixes with CI configuration changes makes it harder to isolate issues and review the core language syntax updates independently

@coveralls
Copy link
Collaborator

coveralls commented Sep 4, 2025

Pull Request Test Coverage Report for Build 390

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 86.599%

Files with Coverage Reduction New Missed Lines %
src/cmark_base/raw_html.mbt 2 81.55%
Totals Coverage Status
Change from base Build 382: 0.0%
Covered Lines: 2307
Relevant Lines: 2664

💛 - Coveralls

@rami3l rami3l force-pushed the fix-compiler-warnings-20250904-063312 branch from a825bf3 to 96452ec Compare September 4, 2025 06:38
@rami3l rami3l merged commit b25f4d4 into main Sep 5, 2025
5 checks passed
@rami3l rami3l deleted the fix-compiler-warnings-20250904-063312 branch September 5, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moonagent Created by MoonAgent.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants