Support build tags

Ouverte
#82 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
30/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
go

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.
Langage dominant
TypeScript
Étoiles
0
Forks
4
Merge moyen
18 h 41 min
PR mergées (30 j)
48

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de DiffCI/core

Toutes les issues de DiffCI/core

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.