Skip to content

Conversation

@Glavo
Copy link
Member

@Glavo Glavo commented Dec 18, 2025

No description provided.

@Glavo Glavo linked an issue Dec 18, 2025 that may be closed by this pull request
@Glavo Glavo requested a review from Copilot December 18, 2025 13:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the inability to parse version numbers with human-readable snapshot format like "26.1 Snapshot 1". The fix enables the parser to recognize and normalize this format to the canonical form "26.1-snapshot-1".

  • Adds parsing support for " Snapshot " format in version strings
  • Ensures proper normalization to the canonical "-snapshot-" format
  • Includes test coverage for the new parsing capability

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
HMCLCore/src/main/java/org/jackhuang/hmcl/util/versioning/GameVersionNumber.java Adds parsing logic for " Snapshot " prefix, following the same pattern as existing "Pre-Release" and "Release Candidate" handling
HMCLCore/src/test/java/org/jackhuang/hmcl/util/versioning/GameVersionNumberTest.java Adds test case to verify "26.1 Snapshot 1" normalizes to "26.1-snapshot-1"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Glavo Glavo merged commit 25c9ef0 into HMCL-dev:main Dec 18, 2025
8 checks passed
@Glavo Glavo deleted the fix-parse-snap branch December 18, 2025 13:09
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.

[Bug] 新的版本号下的世界版本识别错误

1 participant