Skip to content

Fork sort Package from Go 1.13 to Ensure Stability Across Go Versions#487

Closed
endale98 wants to merge 2 commits into
BuildOnViction:masterfrom
endale98:feat/sorts
Closed

Fork sort Package from Go 1.13 to Ensure Stability Across Go Versions#487
endale98 wants to merge 2 commits into
BuildOnViction:masterfrom
endale98:feat/sorts

Conversation

@endale98
Copy link
Copy Markdown

@endale98 endale98 commented Dec 4, 2024

Summary

This pull request introduces a forked version of the sort package from Go 1.13 to replace the current sort package in our codebase. The goal is to prevent instability caused by discrepancies in sorts implementations across different Go versions.

Details

Forked sorts Package

  • Imported the sorts package from Go 1.13 into our codebase.
  • Placed the forked package under internal/sorts to avoid naming conflicts.

Updated References

  • Modified all import statements to use the new forked package.
  • Ensured that all sorting functions now utilize the forked version.

Reasoning

We’ve observed inconsistencies in sorting behavior due to updates and changes in the sorts package in newer Go versions. By standardizing on the Go 1.13 version, we ensure:

  • Consistent Behavior: Uniform sorting results across all environments.
  • Stability: Reduced risk of bugs introduced by future Go version updates.
  • Control: Ability to patch or modify the sorting functions as needed.

Impact

Positive:

  • Improved stability and predictability of sorting operations.
  • Easier debugging and maintenance due to consistent sorting logic.

Neutral:

  • No expected performance degradation.
  • API remains the same; no changes required for dependent code.

Negative:

  • Slight increase in codebase size due to inclusion of the forked package.

@tungng98
Copy link
Copy Markdown
Collaborator

Duplicated with #489

@tungng98 tungng98 closed this May 27, 2025
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