]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dist: don't ship cmd/api
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 2 Aug 2013 17:19:52 +0000 (10:19 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 2 Aug 2013 17:19:52 +0000 (10:19 -0700)
cmd/api is a tool to prevent the Go developers from breaking
the Go 1 API promise. It has no utility to end users and
doesn't run on arbitrary packages (it's always been full of
hacks for its bespoke type checker to work on the standard
library)

Robert's in-progress rewrite depends on the go.tools repo for
go/types, so we won't be able to ship this tool later
anyway. Just remove it from binary distributions.

A future change to run.bash can conditionally build & run
cmd/api, perhaps automatically fetching go/types if
necessary. I assume people don't want to vendor go/types into
a private gopath just for cmd/api.

I will need help with run.bat.

R=golang-dev, adg, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/12316043

misc/dist/bindist.go
src/run.bash

index 754bd280c234e4be2c984034c3f1d3ae0bce8250..f56a88dc6b518c97d7b548bdbd84c89371ed4f9b 100644 (file)
@@ -50,6 +50,7 @@ const (
 var preBuildCleanFiles = []string{
        "lib/codereview",
        "misc/dashboard/godashboard",
+       "src/cmd/api",
        "src/cmd/cov",
        "src/cmd/prof",
        "src/pkg/exp",
index 83ef65bf0b438b49955384fb8d9323c0005a94db..e5f2c384bb7e59d0544cf597771add1b380b1526 100755 (executable)
@@ -176,9 +176,12 @@ unset GOMAXPROCS
 time go run run.go || exit 1
 ) || exit $?
 
-echo
-echo '# Checking API compatibility.'
-go tool api -c $GOROOT/api/go1.txt,$GOROOT/api/go1.1.txt -next $GOROOT/api/next.txt -except $GOROOT/api/except.txt
+if [ -d "$GOROOT/src/cmd/api" ]
+then
+       echo
+       echo '# Checking API compatibility.'
+       go tool api -c $GOROOT/api/go1.txt,$GOROOT/api/go1.1.txt -next $GOROOT/api/next.txt -except $GOROOT/api/except.txt
+fi
 
 echo
 echo ALL TESTS PASSED