Repository navigation
fix(workspace): accept package directory marks - #250
Merged
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.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.
Summary
关联 Issue:1lck/Lithe-IDEA#2546
PR 类型:fix
Maven、Java 等以包目录组织源码的构建工具已经可以通过
workspace/setDirectoryMarks上报源代码根、资源根和测试根,但package这个 Core 目录呈现解析器已有的内建角色没有同时加入宿主方法校验:插件一旦提交包含package的标记,整组setDirectoryMarks会被拒绝,源码/资源根也无法显示。项目树把packagerole 解析成普通folder图标,即使绕过校验也没有包目录的专用呈现。已调查 API-05 的现有
workspace/setDirectoryTypes、workspace/setDirectoryMarks与workspace.resolveDirectoryPresentation:能力本身已经存在,缺的是同一版本内校验、契约文字和呈现的一致性;不需要新方法、新权限或版本升级。该能力不是 Maven 特有,任何按包目录展示源码的第二个构建工具都可以复用;Maven 特有目录判断留在 Maven 插件。改动
workspace/setDirectoryMarks的 workflow 校验接受内建packagerole,并增加回归用例。workspace.resolveDirectoryPresentation将packagerole 的图标从folder改为已有的package图标,并扩展共享 fixture。package;协议更新记录登记本次同一版本内的行为修正。workspace/setDirectoryMarkspackage角色兼容与 SDK
省略该角色时行为完全不变。旧 Core 会按参数无效拒绝包含
package的整组标记;需要该角色的插件应把整组失败作为旧宿主降级信号。四种官方 SDK 已经以通用 JSON 参数/结果暴露workspace/setDirectoryMarks,本 PR 不改变类型、调用形状、错误或日志,因此无 SDK 代码变更;example 不新增。无新增稳定错误码,仍使用既有参数校验失败路径,全契约查重无新增编号。验证
已在 Linux x64 本机执行:
cargo test -p lithe-plugin-rpc workflow:5 passedcargo test -p lithe-project directory_rules:10 passed(在实现修复时执行)cargo fmt --check -p lithe-plugin-rpccargo fmt --check -p lithe-projectnode shared/plugins/scripts/verify-docs.mjs:通过src/main/java、src/main/resources、src/test/java和com/example/qa分别显示 sources/resources/tests/package 标记;未再出现maven.directoryMarks.markFailed未执行:Windows 原生验证(本机为 Linux);动态新增 package 后的刷新补测。
关联插件 PR:lithe-plugin-maven#49。
Link to Devin session: https://app.devin.ai/sessions/0053faef0de247aca7147e15ddd7d6de
Open in Devin Desktop: https://app.devin.ai/desktop/session/0053faef0de247aca7147e15ddd7d6de?variant=devin
Requested by: @1lck
🟢 Devin Review found nothing to fix · View findings