Improve plugin id search in subprojects block
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java
- 领域
- build-system, cli
调研方向
从 src/main/java/com/canonical/devpackspring/rewrite/visitors/FindMethodVisitor.java:47-50 开始,重点关注 containsLiteral 及其与 find(subtree, METHOD_APPLY, true) 的使用。跟踪 AddPluginVisitorSupport.handleSubprojectsBlock,以确认此匹配如何控制插入。当无关的嵌套参数不被计为现有的插件应用,而预期的插件参数仍被计为插件应用时,即完成。
由索引模型根据 Issue 内容生成。
描述
─── src/main/java/com/canonical/devpackspring/rewrite/visitors/FindMethodVisitor.java:47-50 ───
[bug · medium] In `containsLiteral`, the plugin-id literal is matched *anywhere* inside the `apply`
invocation subtree (including nested expressions/arguments such as a `from`/`to` map entry), not
specifically the plugin argument. Combined with `find(subtree, METHOD_APPLY, true)` (recursive), an
`apply` call in a `subprojects` block that happens to contain the plugin id string in an unrelated
nested argument would be treated as "plugin already applied" and
`AddPluginVisitorSupport.handleSubprojectsBlock` would skip adding the `apply plugin` statement.
Consider matching only the expected argument position (e.g., the `plugin:`/`plugin =` argument)
instead of any literal in the subtree.
- 主要语言
- Java
- 星标
- 1
- 派生
- 5
- 平均合并
- 2 天 30 分钟
- 30 天内合并 PR
- 17
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
canonical/devpack-for-spring-cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
canonical/devpack-for-spring-cli#292 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
canonical/devpack-for-spring-cli#283 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
canonical/devpack-for-spring-cli#270 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 70/100
canonical/devpack-for-spring-cli#291 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 70/100
canonical/devpack-for-spring-cli#269 ·
维护者通常 1 天内回复
查看 canonical/devpack-for-spring-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
github/copilot-sdk#2793 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
enhancement good first issue
难度 1/5 1-3 小时 新手友好度 88/100