Support build tags

Đang mở
#82 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
build-system, testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
18 giờ 41 phút
Pull request đã merge (30 ngày)
48

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DiffCI/core

Tất cả issue của DiffCI/core

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.