Repository navigation
feat(build): 构建树排布与编码模型多选选项的默认激活项和取消前缀 - #86
Merged
Merged
Conversation
This was referenced Nov 18, 2026
Mucheen
marked this pull request as ready for review
November 18, 2026 02:17
…pr86 # Conflicts: # shared/plugins/reference/protocol-changelog.md
- 保留兄弟构建根的本机值和空选择标记,恢复默认前检查实例继承。 - 在生成 Run 条目时使用模型取消前缀,并在配置启动时应用逐项覆盖。 - 为实际激活集合绑定模型调用的选项指纹,供构建树和编辑器复用。 - 用合成清单覆盖回归,补齐选项编辑契约、共享样例和协议记录。 Refs 1lck/Lithe-IDEA#2092
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs 1lck/Lithe-IDEA#2092
配套桌面宿主 PR:1lck/Lithe-IDEA#2118
配套 Maven 插件 PR:Lithe-IDEA/lithe-plugin-maven#30
改动
为声明式构建系统(
buildSystems)补齐模型提供的多选选项默认激活项、取消前缀编码与 Build 工具窗口树顶勾选节点排布。所有合并、默认激活解析、排除项编码和树节点排布都放在 Core,对所有构建工具一致,不认识任何具体构建系统。buildSystems[].options[](仅kind: "multiSelect")新增可选字段excludePrefix:1–4 个可打印非空白字符,不能含该选项的separator,用于把未勾选的默认激活项编码为<excludePrefix><value>(如"-dev");安装审查在声明了该字段时同步包含excludePrefix。model.map新增可选optionDefaults(静态模型选择规则,目标选项须声明choicesFromModel: true)。litheBuildModel新增可选optionDefaults: { <optionID>: [...] }与optionExcludePrefixes: { <optionID>: "<prefix>" }。解码时保证optionDefaults始终是optionValues的子集,过滤掉含separator或以取消前缀开头的候选;只输出这两个模型字段、不改plugin.json的插件在旧宿主上也会被安全忽略未知模型字段。build.resolveOptions/build.editStoredOption):selectedChoices、modelDefaults、modelExcludePrefixes。encode_selected_choices将用户勾选的正向候选集合编码为存储值:未勾选的默认激活项自动写入<excludePrefix><value>(全部取消时写入["-dev"],冷启动尚无模型时也能抑制构建工具自带的默认激活项);无团队覆盖且勾选集合等于默认激活集时返回null,自动清除本机覆盖。multiSelect选项合并多实例兄弟值时,新增的正向/反向条目会自动移除相反方向的旧条目。build.resolveOptions在候选上标出defaultActive: true,并在存在默认激活项、取消前缀或自定义已选值时返回正向勾选列表selectedChoices(原有无默认项用例的 JSON 逐字节保持不变)。build.modelTree):options,model新增可选optionValues、optionDefaults、optionExcludePrefixes。presentation: "tree"且kind: "multiSelect"的选项在构建系统树顶部生成kind: "option"节点(key: "option:<id>",detail汇总当前已勾选标题)和子级kind: "optionChoice"节点(key: "option:<id>:<value>",携带optionID、optionValue、checked、defaultActive)。option仅匹配自身label/tooltip(不把汇总detail当作整组命中),使搜索单个候选名时自动展开父选项并定位到命中的optionChoice。shared/plugins/contract/v1/README.md、shared/plugins/contract/v1/plugin-manifest.schema.json、shared/plugins/reference/domains/build-systems.md、shared/plugins/reference/protocol-changelog.md与rust/contracts/rust-core-api.md。rust/fixtures/build/model-tree-v1.json新增默认激活勾选树与筛选场景。验证
cargo fmt --manifest-path rust/Cargo.toml --check通过。cargo clippy -p lithe-build -p lithe-core --all-targets --all-features -- -D warnings零警告通过。cargo test -p lithe-core --lib 'tests::build_model_tree'(4/4)、cargo test -p lithe-core --lib 'tests::build_systems'(55/55,含新增model_option_defaults_and_exclusions_round_trip_through_storage_and_plans及既有黄金计划对比)、cargo test -p lithe-core --lib 'tests::published_build_plugins'(12/12)全部通过。node shared/plugins/scripts/verify-docs.mjs、node scripts/rust-core/verify-platform-tests.mjs、bash scripts/rust-core/verify-rust-core-comments.sh build core全部通过。