refactor(instance): remove unused Cleanroom installer preprocessing - #2002
xunying123 wants to merge 2 commits into
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors Cleanroom installation to handle only installer library extraction, version metadata, and library download scheduling, removing BINPATCH/client.lzma extraction, MOJMAPS handling, and Forge-style processor preprocessing and output. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src-tauri/src/instance/helpers/loader/cleanroom.rs" line_range="225-229" />
<code_context>
- }
- });
-
- fs::write(
- instance.version_path.join("install_profile.json"),
- &serde_json::to_vec_pretty(&profile)?,
- )?;
-
let cleanroom_info: McClientInfo = serde_json::from_str(&version)?;
client_info.main_class = cleanroom_info.main_class.clone();
</code_context>
<issue_to_address>
**issue (broader_impact):** When an existing Cleanroom instance still has the previously generated `install_profile.json`, this refresh no longer replaces or removes it. `finish_mod_loader_install` subsequently discovers that stale file and executes its processors, so the removed preprocessing is still run with potentially stale paths and arguments.
**Triggers:** When upgrading or refreshing an instance created by the previous implementation.
**Suggested fix:** Remove the stale `install_profile.json` for Cleanroom instances, or make `finish_mod_loader_install` skip processor execution for Cleanroom.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: src-tauri/src/instance/helpers/loader/cleanroom.rs:229
|
这里还有一个比“旧 Cleanroom 实例残留 profile”更明确的触发场景:从 Forge/NeoForge 切换到 Cleanroom。
建议让 |
Checklist
This PR is a ..
Related Issues
None.
Description
Remove Forge-style processor preparation, BINPATCH/MOJMAPS handling, and client.lzma extraction from Cleanroom installation. Keep installer library extraction, version.json parsing, patch construction, and library download scheduling.
Additional Context
cargo check --all-targets, formatting, and diff checks passed. No migration or cleanup is included for existing instances.Summary by Sourcery
Remove unused Forge-style preprocessing from Cleanroom installation while preserving required library and version setup.
Bug Fixes:
Enhancements: