Skip to content

修复 Curse 整合包更新后未移除旧的模组#6185

Open
zkitefly wants to merge 6 commits into
HMCL-dev:mainfrom
zkitefly:fix-4315
Open

修复 Curse 整合包更新后未移除旧的模组#6185
zkitefly wants to merge 6 commits into
HMCL-dev:mainfrom
zkitefly:fix-4315

Conversation

@zkitefly

Copy link
Copy Markdown
Member

Fix #4315

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Glavo

Glavo commented Jun 16, 2026

Copy link
Copy Markdown
Member

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates CurseInstallTask.java to read the previous manifest from manifest.json if it exists, falling back to the configuration manifest. This ensures that resolved file names are used when removing old mods during an update, preventing issues where file names are missing in the raw CurseForge manifest. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@Glavo Glavo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

本审查建议由 GPT-5 生成


已将具体审查建议标注在对应代码行。

zkitefly added 2 commits June 25, 2026 19:42
在更新Curse模组包时,不再删除覆盖目录mods子文件夹内已存在的本地模组,仅删除清单中不存在的外部模组
@zkitefly

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Minecraft269

Copy link
Copy Markdown

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces changes to CurseInstallTask.java to prevent the deletion of overridden mods during updates. It adds a helper method getNewOverridesMods() to parse the modpack zip and extract overrides, and updates the execute() method to read the enriched manifest from manifest.json if available. A critical bug was identified in getNewOverridesMods() where path normalization mismatches prevent the correct detection of overrides, and a code suggestion has been provided to resolve this issue.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/curse/CurseInstallTask.java Outdated
…nstallTask.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@Minecraft269

Copy link
Copy Markdown

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the CurseForge modpack installation task to prevent deleting mods that are included in the new overrides when updating. It also attempts to read the previous manifest from manifest.json to ensure resolved file names are used. The review feedback correctly identifies a potential NullPointerException if manifest.json is empty or corrupt, as JsonUtils.fromJsonFile could return null and calling .files() on it would cause the task to crash without being caught by the existing try-catch block. A code suggestion was provided to safely handle this case.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

处理读取旧manifest文件失败或解析后为空的情况,避免空指针
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] 更新整合包后未移除旧的模组

3 participants