Skip to content

fix(cli): skip target checks with no matching packages - #2326

Open
J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2267
Open

J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2267

Conversation

@J4ck1e2000

Copy link
Copy Markdown
Contributor

Summary

nsgo check -target now reports a skip when no packages match a target's build constraints. It still vets the other targets, preserves real vet failures, and fails when nothing was vetted. Host checks and the repository's extra vets are unchanged.

Fixes #2267.

Targets

  • Shared code (nsgo tool)

Screenshots

None; CLI behavior only.

Verification

On macOS arm64:

  • go tool nsgo check ./cmd/nsgo
  • go tool nsgo test -run '^TestCheckTargetEmptyPackageSets$' ./cmd/nsgo -- -count=1 (mixed targets, all empty, real diagnostics, and unavailable SDKs)
  • TestCheckTargetSkipsRealBuildConstraints, TestCheckTargetFailuresContinue, and four related target-check regressions also passed in the targeted ./cmd/nsgo run. The real fixture vets Linux and checks the Web skip.

Full repository tests were not run locally.

Checklist

  • Conventional Commit title.
  • Tool architecture, English and Chinese contributing guides, app-author skill, and a changelog fragment updated.
  • No third-party code, assets, or dependency changes.

🤖 openai-codex/gpt-6.2-sol

Report target build constraints that leave nothing to vet as a skip, while preserving genuine failures and failing an entirely skipped check.

Fixes nsgo-dev#2267
@github-actions github-actions Bot added bug Something isn't working size/M documentation Improvements or additions to documentation cli labels Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cli documentation Improvements or additions to documentation size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cmd/nsgo: nsgo check -target fails a target whose packages are all excluded by build constraints ("matched no packages")

1 participant