Scope go:generate, cgo, assembly and plugin fallbacks to the affected package

未關閉
#78 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
55/100
Issue 類型
重構
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
go, typescript
領域
tooling

研究方向

Start in src/repo/adapters/go.ts at analyzeGoMetadata, then read AdapterContribution in src/repo/adapters/types.ts and the vue.ts usage of subjectBlockers / fileBlockers. Trace how the current global blockers list forces fallback, and identify the existing fixture setup for adapter tests. Done when fixtures prove a change in package a stays selective when unrelated package b has //go:generate or cgo files, while a change in b or its dependents still falls back; //go:linkname remains global.

由索引模型根據 Issue 內容生成。

描述

adapter enhancement help wanted

Part of #76.

analyzeGoMetadata in src/repo/adapters/go.ts pushes these to the global blockers list:

  • Go <pkg>: cgo dependencies require full validation
  • Go <pkg>: native assembly/object dependencies require full validation
  • Go <pkg>: runtime plugins require full validation
  • Go <file>: generated or linked dependencies require full validation

A global blocker makes every change fall back, so one //go:generate stringer or mockgen line anywhere disables selection for the whole repository. Most medium-sized Go repositories have at least one.

Proposal

  • Report these through subjectBlockers / fileBlockers (see AdapterContribution in src/repo/adapters/types.ts and how vue.ts uses them). Changes that can't reach the package then stay selective.
  • //go:generate: the generated output is usually committed, so go list already sees it as a normal source. Fall back only when the file with the directive, or the generator's inputs, change.
  • //go:linkname: keep a global blocker. It can reach into any package, so scoping isn't safe.

Must fall back (blocker)

  • A change to a package with cgo/assembly/plugin, or to anything that reaches it.
  • Any //go:linkname use (still global).

Done when

  • Fixtures show that a change in package a stays selective when unrelated package b has a //go:generate line or cgo files, and that a change in b (or a package b imports) still falls back.
主要語言
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 摘要。