Merge branch 'feat/m135-deadlabel-drop-dead-launch-loader-l'
Guards / 依赖许可与来源(cargo-deny) (push) Canceled after 0s
Guards / 文件行数 ≤400 守门 (push) Canceled after 0s
Guards / unsafe 落点守门(集合必须恰好一个文件) (push) Canceled after 0s
Guards / design 零第三方依赖守门 (push) Canceled after 0s
Guards / presenter 零 UI 守门 (push) Canceled after 0s
Guards / core 零 UI 守门 (push) Canceled after 0s
Dev Guards / 架构与合规守门(同 main 口径) (push) Canceled after 0s
Dev Guards / fmt (rustfmt --check) (push) Canceled after 0s
Dev Guards / clippy (ubuntu) (push) Canceled after 0s

This commit is contained in:
AskaEth committed 2026-11-05 19:15:59 +08:00
commit 01ca8033be
5 files changed
+12 -25

No files matched your search

+5 -3
View File
@@ -32,9 +32,11 @@
//! 词表,`json_rows_*` 钉真二进制输出面(0.2.0 已发出去过,所以这步是确认而不是可选)。
//!
//! ⚠️ 分工要看准:**编译器只拦「漏 match」**,新种类在消费方用 `=> Vanilla` 糊过去编得过。
//! ③ 那条集合断言拦的是**对外词表**,但**拦不住显示路径**:`presenter/src/host/game.rs::dto_kind`
//! 里糊一支 `=> Vanilla` 并把契约与 help 补齐后,三个 crate 全绿而磁贴静默显示「原版」——那处
//! 目前**没有守卫**(已知缺口,另行记账)。**改名**同理:往返测试绿,只有 ③ 会红(故意再抄)。
//! ③ 那条集合断言拦的是**对外词表**;**显示路径另有守卫**(M134 起):`presenter/src/host/game.rs::dto_kind`
//! 不再是自己一张手写 match,而是拿 core 的稳定 id 反查 DTO 词表——想在那一支糊 `=> Vanilla` 已经
//! 没有 match 可写,加一家加载器会在 `dto::LoaderKind::from_core` 先编不过;糊错由 presenter 的
//! `loader_kind_ids_are_the_released_contract`、以及按 `ALL` 遍历不手抄清单的
//! `every_core_loader_kind_reaches_the_tile_as_itself` 钉住。**改名**同理:往返测试绿,只有 ③ 会红。
//!
//! # 解析规则(按整段前缀匹配,大小写不敏感,**最靠左的标记胜**)
//!
+1 -1
View File
@@ -62,7 +62,7 @@ pub enum CoreText {
/// 每一条都得在 `crates/presenter` / `crates/core` 里找得到出处(注释里给位置),
/// 不许凭想象加——凭空加的条目会让 [`classify`] 假装覆盖了实际没覆盖的东西。
const LEGACY_STATUS: &[(&str, Key)] = &[
// `presenter::dto::instances::LoaderKind::label()` / `host::launch::loader_label()`
// `presenter::dto::instances::LoaderKind::label()`(全仓唯一那份显示词表)
("原版", Key::LoaderVanilla),
// `presenter::host::job.rs`:`LogOutcome::SilentFail` 的展示文字
("静默失败(exit 0 但游戏没起来)", Key::LaunchOutcomeSilent),
+4 -4
View File
@@ -282,12 +282,12 @@ mod tests {
}
/// 对外契约:七个 id 在测试里**独立抄一遍**(0.2.0 已发布形状),并与 core 的 `ALL` 做
/// **集合比较**——这是对外词表的守卫(与 CLI 的 help 守卫互补;显示路径
/// `presenter::host::game::dto_kind` 目前没有守卫,见 `game::loader` 的模块文档)。
/// **集合比较**——这是对外词表的守卫(与 CLI 的 help 守卫互补)。显示路径另有守卫:
/// `presenter::host::game::every_core_loader_kind_reaches_the_tile_as_itself`(按 `ALL` 遍历)。
///
/// 为什么不是编译器管:编译期只拦得到「漏 match」,而新种类在三处消费方用最省事的
/// 为什么不是编译器管:编译期只拦得到「漏 match」,而新种类在还有 match 的消费方用最省事的
/// `=> Vanilla` 糊过去**编得过**,那时新加载器会静默显示成原版(`game::loader` 模块文档
/// 第 ③ 步)。真正拦住它的是下面第 ② 段的集合断言。
/// 第 ③ 步)。对外词表由下面第 ② 段的集合断言守,显示路径由上面那条测试守。
///
/// 抓得住:改词表(`neoforge` → `neo_forge`);**新增一家加载器而没主动更新这份契约**
/// (core 的 `ALL` 多一支 ⇒ 集合不等);DTO 委派接错支(`OptiFine` 映到 `LiteLoader`);
+1 -16
View File
@@ -23,9 +23,7 @@ use unlucky_core::launch::tree_kill;
use unlucky_core::launch::{Launcher, LauncherConfig};
use unlucky_core::platform::paths::ProcessEnv;
use crate::dto::{
InstanceId, InstanceRuntime, LaunchFinished, LaunchStage, LoaderKind, LogOutcome, Progress,
};
use crate::dto::{InstanceId, InstanceRuntime, LaunchFinished, LaunchStage, LogOutcome, Progress};
use super::env::HostEnv;
use super::job::{launch_summary, HostTask, JobSender};
@@ -334,19 +332,6 @@ fn describe_warning(warning: &AdapterWarning) -> String {
}
}
/// 加载器 → 适配层的模组加载器标记(GUI 只用于显示,不改命令行)。
pub fn loader_label(kind: LoaderKind) -> &'static str {
match kind {
LoaderKind::Vanilla => "原版",
LoaderKind::Fabric => "Fabric",
LoaderKind::Quilt => "Quilt",
LoaderKind::Forge => "Forge",
LoaderKind::NeoForge => "NeoForge",
LoaderKind::OptiFine => "OptiFine",
LoaderKind::LiteLoader => "LiteLoader",
}
}
/// 隔离档位的展示串(`isolated` / `shared`)。
pub fn isolation_label(mode: IsolationMode) -> &'static str {
mode.as_str()
+1 -1
View File
@@ -97,7 +97,7 @@
//! 的完成报告:本 crate 的依赖树里只有 serde / serde_json / unlucky-core(及其自身依赖)。
// 关于 dead_code:host 里有一批「已定义、由单测覆盖、等 iced 页面接线才调用」的辅助函数
// (`host::logs::session_finished`、`host::settings::clear_vendor_priority`、`loader_label`
// (`host::logs::session_finished`、`host::settings::clear_vendor_priority`
// 等)。它们原本住在 `crates/app` 里,由那边的 crate 级 `#![allow(dead_code)]` 一并放开;
// 搬进 lib 之后「pub 但模块私有」会被判成死码。逐条 `#[allow]` 会把噪音藏进实现细节,
// 这里沿用同一条策略统一放开,接线完成后再删掉本行暴露真死码。