Repository navigation
feat(run-config): 批处理运行在非 Windows 平台可新建、编辑,标为不可运行 - #87
Merged
Merged
Conversation
- configurationTypes 在所有平台列出四种内置类型;本机不能运行的类型带 availability(unsupportedPlatform) - editorForm 在所有平台给出批处理表单,并附 availability;saveConfiguration 照常保存 - resolve 不再丢弃非 Windows 上的批处理配置,改为列出并标 unsupportedPlatform;createLaunchPlan 仍拒绝启动 - 更新 rust-core-api.md 与测试 Refs 1lck/Lithe-IDEA#2100
…ble-off-windows # Conflicts: # rust/crates/execution/src/configuration/form.rs
xiaoyumuxi
marked this pull request as ready for review
November 18, 2026 03:17
This was referenced Nov 18, 2026
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
类型
feat:在 macOS 和 Linux 上也能新建、编辑批处理(cmd)运行配置,只是标为本机不能运行
改动
#85 合入时,批处理只出现在 Windows 的类型列表里,在其他平台上已保存的批处理配置会被丢掉,只给一条
unsupportedPlatform诊断。用户希望项目和 Windows 同事共用时,在 Mac 上也能看到并编辑这些配置,只是提醒不能在本机运行、运行按钮置灰。runConfig.configurationTypesprocess.batch{types: [{provider, availability?}]};本机不能运行的类型带availability(unsupportedPlatform)runConfig.editorFormnot_supportedavailabilityrunConfig.saveConfigurationnot_supportedrunConfig.resolveunsupportedPlatform诊断availability为{status: "unavailable", code: "unsupportedPlatform"};不再出这条诊断runConfig.createLaunchPlanlaunch_plan里的平台检查也保留)process.rs:supported_on(provider, platform) -> bool换成provider_availability/platform_availability,返回 availability,Kind::supported_on保留。resolve.rs:availability 的先后是插件不可用 →invalidConfiguration→unsupportedPlatform→missingWorkingDirectory,先到先得;默认选中的配置本来就跳过带 availability 的条目。rust/contracts/rust-core-api.md:更新命令表、availability 代码列表、configurationTypes与editorForm的返回值、resolve 一节。测试
built_in_process_runs_are_created_edited_moved_and_deleted_through_the_editor_form里的类型列表断言:所有平台都期望四种类型;非 Windows 上只有批处理带unsupportedPlatform。batch_runs_are_editable_but_unavailable_outside_windows(原batch_runs_are_unavailable_outside_windows,Windows 上跳过):已保存的批处理配置被列出并带unsupportedPlatform、没有诊断;已有配置和新建配置的表单都正常返回并带 availability;保存成功;createLaunchPlan拒绝。cargo fmt --check、cargo clippy -p lithe-execution -p lithe-core --all-targets -- -D warnings、cargo test -p lithe-core -p lithe-execution全部通过(本机 macOS)。