Support build tags

Aberta
#82 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
30/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
go
Domínio
build-system, testing

Direção de pesquisa

The fallback happens when GOFLAGS is non-empty or a .go file falls outside the active build context. Start by finding where GOFLAGS is checked and where the build-context fallback messages are produced, then trace how go list is invoked. The done condition is a fixture with foo_integration_test.go behind //go:build integration: with the tag declared in diffci.json, a change to foo.go selects the package under both tag sets, and without the declaration it still falls back. Because the design is still open, confirm the -mod=readonly question before coding.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

adapter enhancement help wanted

Part of #76.

Any non-empty GOFLAGS falls back:

Go custom build flags or incomplete build context require full validation

Files behind a tag that isn't active also fall back (Go files outside the active build context require full validation: …). Repositories with //go:build integration test files hit this constantly.

Proposal

  • Accept GOFLAGS when it contains only -tags=... (and maybe -mod=readonly). Pass the same flags to go list and put them in executionEnv, so the go test command uses the build context that was analysed.
  • Let diffci.json declare extra tag sets (for example "go": { "tags": [[], ["integration"]] }). Run go list once per set, merge the packages, and emit one command group per set.

Must fall back (blocker)

  • Any other GOFLAGS entry (-ldflags, -gcflags, -overlay, ...).
  • A .go file that none of the analysed tag sets or platforms includes.

Done when

  • A fixture with foo_integration_test.go behind //go:build integration shows that, with the tag declared, a change to foo.go selects the package under both tag sets, and without the declaration it still falls back.
Linguagem predominante
TypeScript
Estrelas
0
Forks
4
Merge médio
18h 41min
PRs com merge (30d)
48

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de DiffCI/core

Todas as issues de DiffCI/core

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.