Maven: follow a custom `<testSourceDirectory>`

未关闭
#163 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

Start in src/repo/adapters/maven.ts and inspect how custom source roots trigger the full-validation blocker. Find the Maven adapter tests and synthetic fixtures under tests/repo/, then add cases for a resolvable custom test root, a custom source root, and an unresolved or outside-module test root. Run npm test; done means only the resolvable test-root case avoids fallback, while the other two still fall back for the stated reason.

由索引模型根据 Issue 内容生成。

描述

adapter help wanted

Part of #89 (the "Follow custom <sourceDirectory> and <testSourceDirectory> roots" step), split out so it can be done on its own.

Today any custom source root makes the Maven adapter fall back to the full suite: src/repo/adapters/maven.ts sets customSourceRoots when a POM's <sourceDirectory> isn't src/main/java or its <testSourceDirectory> isn't src/test/java, and that adds the blocker Maven <pom>: custom source roots require full validation.

The test root alone is the smaller half: it only changes where tests are found, not how modules depend on each other.

Done when:

  • A module whose only customization is <testSourceDirectory> finds its tests there and no longer falls back for that reason.
  • A custom <sourceDirectory> still falls back, with the same reason as today.
  • A <testSourceDirectory> the adapter can't resolve with certainty (a property such as ${project.basedir}/..., or a path outside the module) still falls back. Never guess.
  • There are synthetic Maven fixtures under tests/repo/ for each case above.

maven.ts is 128 lines. This is a step up from a good first issue: it suits someone who has already merged a PR or two here.


See CONTRIBUTING.md: add a synthetic fixture, run npm test, and sign off commits with git commit -s. Comment here to claim the issue.

主要语言
TypeScript
星标
0
派生
4
平均合并
18 小时 41 分钟
30 天内合并 PR
48

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DiffCI/core 的其他 Issue

查看 DiffCI/core 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。