Skip to content

cmd/api: remove contexts slice by parsing go tool dist list -json output #14892

Open
@minux

Description

@minux

It's discovered in https://golang.org/cl/20935 that cmd/api contains
a copy of supported platforms along with their cgo support status.

We should remove those hardcoded values and use go tool dist list -json
instead.

Activity

self-assigned this
on Mar 21, 2016
added this to the Go1.7 milestone on Mar 21, 2016
modified the milestones: Go1.8, Go1.7 on May 17, 2016
added
NeedsFixThe path to resolution is known, but the work has not been done.
on Oct 5, 2016
quentinmit

quentinmit commented on Oct 5, 2016

@quentinmit
Contributor

@minux Any news on this?

rsc

rsc commented on Oct 18, 2016

@rsc
Contributor

@quentinmit, can you fix this please?

assigned and unassigned on Oct 18, 2016
gopherbot

gopherbot commented on Oct 18, 2016

@gopherbot
Contributor

CL https://golang.org/cl/31364 mentions this issue.

quentinmit

quentinmit commented on Oct 18, 2016

@quentinmit
Contributor

This has become very complicated. I have the patch to do this, but it uncovers years of API diff as a result. I need to improve the api tool's diff algorithm to handle these sanely.

minux

minux commented on Oct 18, 2016

@minux
MemberAuthor
bradfitz

bradfitz commented on Oct 19, 2016

@bradfitz
Contributor

Once you remove the two oddballs which don't matter (nacl and plan9), then there are only a few problems:

-pkg syscall, const O_ASYNC ideal-int  (not in: [solaris-amd64 solaris-amd64-cgo])  
-pkg syscall, const SOCK_DGRAM = 2  (not in: [linux-mips64 linux-mips64-cgo linux-mips64le linux-mips64le-cgo solaris-amd64 solaris-amd64-cgo]) 
-pkg syscall, const SOCK_RAW = 3  (not in: [solaris-amd64 solaris-amd64-cgo])  
-pkg syscall, const SOCK_SEQPACKET = 5  (not in: [solaris-amd64 solaris-amd64-cgo]) 
-pkg syscall, const SOCK_STREAM = 1  (not in: [linux-mips64 linux-mips64-cgo linux-mips64le linux-mips64le-cgo solaris-amd64 solaris-amd64-cgo])  
-pkg syscall, func Utimes(string, []Timeval) error  (not in: [solaris-amd64 solaris-amd64-cgo])  

Looks easy enough to fix.

gopherbot

gopherbot commented on Oct 19, 2016

@gopherbot
Contributor

CL https://golang.org/cl/31446 mentions this issue.

5 remaining items

removed this from the Go1.8Maybe milestone on Dec 5, 2016
modified the milestones: Go1.10, Go1.9 on May 23, 2017
modified the milestones: Go1.10, Unplanned on Nov 15, 2017
iwdgo

iwdgo commented on May 24, 2021

@iwdgo
Contributor

The current set of GOOS/GOARCH in cmd/api combines the first class ports, now listed by go tool dist list -json supplemented by a selection:

freebsd/386
freebsd/amd64
freebsd/arm
netbsd/386
netbsd/amd64
netbsd/arm
netbsd/arm64
openbsd/386
openbsd/amd64

Using all existing ports might be very costly. Restricting the run to first class ports seems to fit the purpose of the issue.

gopherbot

gopherbot commented on May 24, 2021

@gopherbot
Contributor

Change https://golang.org/cl/322309 mentions this issue: cmd/api: set first class ports as default

gopherbot

gopherbot commented on Aug 17, 2021

@gopherbot
Contributor

Change https://golang.org/cl/342809 mentions this issue: cmd/api: remove default API check for openbsd amd64

moved this to Planned in Go Releaseon Sep 27, 2022
gopherbot

gopherbot commented on Jan 4, 2023

@gopherbot
Contributor

Change https://go.dev/cl/460536 mentions this issue: cmd/api: run check on first class ports

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

    NeedsFixThe path to resolution is known, but the work has not been done.help wanted

    Type

    No type

    Projects

    Status

    Planned

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bradfitz@rsc@quentinmit@minux@gopherbot

        Issue actions

          cmd/api: remove contexts slice by parsing `go tool dist list -json` output · Issue #14892 · golang/go