Support go.work workspaces

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, typescript
领域
build-system

调研方向

Start with the Go adapter, where go list is run with GOWORK=off and where the single-root go.mod fallback message is raised, and with the test command that does the same. The issue asks for a fixture with go.work and two modules, where b imports a, to show that a change in a selects tests in both modules while a change in b selects only b. Done means that fixture passes and the fallback still triggers for go.work edits and for use or replace paths outside the repository.

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

描述

adapter enhancement help wanted

Part of #76.

Any repository with a go.work file falls back today:

Go support requires one root go.mod; workspaces and nested modules require full validation

The adapter runs go list with GOWORK=off, and the test command does the same.

Proposal

  • When go.work exists and every use directory is inside the repository, run go list -deps -test -json for each workspace module (or once with GOWORK on, if offline listing stays reliable) and merge the packages into one graph. Cross-module imports between workspace modules become normal package edges.
  • Map each test file to its module and package, and run go test from the right module directory, with one command group per module if needed.

Must fall back (blocker)

  • A use directory outside the repository, a replace in go.work pointing outside it, or go list failing for any module.
  • Changes to go.work or go.work.sum (already a full run through the configuration-change rule).

Done when

  • A fixture with go.work and two modules, where b imports a, shows that a change in a selects tests in both modules and a change in b selects only b.
主要语言
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 摘要。