Repository navigation
feat(build): let build.editStoredOption remove a dropped option's value - #123
Merged
Merged
Conversation
A plugin update may stop declaring an option the user had set (the Maven plugin's javaHome, replaced by the project JDK). Detection already names it in droppedOptions, but editStoredOption refused the unknown ID, so the stale value stayed in the local document forever. An undeclared optionID now accepts value: null and removes its local workspace value, instance default and this root's value; anything else is still refused. Refs 1lck/Lithe-IDEA#2203 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明
#2203 要去掉 Maven 插件里单独的
JDK (JAVA_HOME)选项,编译和启动统一使用项目 JDK,与 IDEA 的单一项目 SDK 一致。插件不再声明javaHome之后,用户以前保存的值会被build.detect列进droppedOptions,不再生效。但build.editStoredOption会以 “Unknown declared option” 拒绝不认识的 ID,这个过期的值就永远留在本机文档里,宿主没办法清掉它,也没办法在“清除”之后不再提示。build.editStoredOption对清单中已不存在的optionID只接受value: null。这会删除本机文档中该构建系统的工作区值、实例默认值、当前根的值,以及空选择标记,然后照常剪掉空节点、重新校验,并返回编辑后的选项描述。selectedChoices)仍以plugin.build.invalidOption拒绝。finish_edit,供已声明选项和已删除选项两条路径共用。rust-core-api.md的build.editStoredOption一行补充了这条规则。插件契约(shared/plugins/contract/v1/)、能力和插件函数协议都没有改动,所以不登记协议更新记录。验证
a_dropped_option_can_only_be_removed:本机文档里同时有已删除的javaHome(工作区值和实例值)和仍声明的profiles。以null编辑后,只删掉了javaHome;写入非空值时被拒绝。cargo test -p lithe-core中构建系统相关测试 66 项通过。🤖 Generated with Claude Code