Skip to content

nsgo check -target and nsgo test -target take different platform names (windows vs windows_x64) #589

Closed

Description

@houko

Context

Line numbers are at 3e378c5 (main).

nsgo check -target and nsgo test -target take different names for the same platforms:

  • nsgo check -target windows fails with unknown target "windows" (cmd/nsgo/check.go:161). It needs windows_x64 or windows_arm64, and likewise macos_arm64, linux_x64 (cmd/nsgo/build.go:267, cmd/nsgo/check_test.go:81).
  • nsgo test -target windows takes the plain OS name (macos, windows, linux).

Why it matters

Contributors and agents verifying a cross-platform change run both commands for the same platform one after the other, and every mismatch costs a failed round trip, often on a remote build host. While implementing #567, #568, #569, #570 and #315, each of the five independent runs hit this at least once.

Proposal

Let each command accept the other's spelling: check -target windows vets the host's or both architectures of that OS (or windows_x64 by default), and test -target windows_x64 runs the windows target on that architecture where it can, or says which name to use. At the least, list the accepted names in check's error as build's error does (cmd/nsgo/build.go:494).

Acceptance

  • nsgo check -target windows and nsgo check -target linux vet those platforms.
  • An unknown target in either command lists the names it accepts.

Activity

  1. houko commented on Nov 18, 2026

    @houko
    CollaboratorAuthor

    nsgo dev adds a third spelling. go tool nsgo dev -target macos fails with unknown dev target "macos"; use native, web, ios, ios_simulator, … (cmd/nsgo/dev.go:680 on main at 30a5b8b): dev calls the desktop native, test -target calls it macos / windows / linux, and check -target wants macos_arm64 / windows_x64 / linux_x64. Moving between the three commands for one platform, each spelling fails in one of the others; whatever names are accepted, it would help if all three accepted the same ones (dev -target macos meaning native on a Mac, for instance).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions