diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2013-05-06 17:25:09 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2013-05-06 17:25:09 -0700 |
| commit | 9e93d5014e6a2e0ef9daf89489c7b12531fc95f3 (patch) | |
| tree | 015916ab17a79cba398fd66fb5e1a070a967f20c /src | |
| parent | f322c786923ebef0c012ff65df8bab767f0d1ace (diff) | |
| download | go-9e93d5014e6a2e0ef9daf89489c7b12531fc95f3.tar.xz | |
api: add go1.1.txt; update cmd/api to use it
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/9250043
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/api/goapi.go | 9 | ||||
| -rwxr-xr-x | src/run.bash | 2 | ||||
| -rw-r--r-- | src/run.bat | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go index d5e66428b7..ff75f00e39 100644 --- a/src/cmd/api/goapi.go +++ b/src/cmd/api/goapi.go @@ -38,9 +38,7 @@ import ( // Flags var ( - // TODO(bradfitz): once Go 1.1 comes out, allow the -c flag to take a comma-separated - // list of files, rather than just one. - checkFile = flag.String("c", "", "optional filename to check API against") + checkFile = flag.String("c", "", "optional comma-separated filename(s) to check API against") allowNew = flag.Bool("allow_new", true, "allow API additions") exceptFile = flag.String("except", "", "optional filename of packages that are allowed to change without triggering a failure in the tool") nextFile = flag.String("next", "", "optional filename of tentative upcoming API features for the next release. This file can be lazily maintained. It only affects the delta warnings from the -c file printed on success.") @@ -186,7 +184,10 @@ func main() { return } - required := fileFeatures(*checkFile) + var required []string + for _, file := range strings.Split(*checkFile, ",") { + required = append(required, fileFeatures(file)...) + } optional := fileFeatures(*nextFile) exception := fileFeatures(*exceptFile) fail = !compareAPI(bw, features, required, optional, exception) diff --git a/src/run.bash b/src/run.bash index b197844fe4..305ff7f417 100755 --- a/src/run.bash +++ b/src/run.bash @@ -150,7 +150,7 @@ time go run run.go echo echo '# Checking API compatibility.' -go tool api -c $GOROOT/api/go1.txt -next $GOROOT/api/next.txt -except $GOROOT/api/except.txt +go tool api -c $GOROOT/api/go1.txt,$GOROOT/api/go1.1.txt -next $GOROOT/api/next.txt -except $GOROOT/api/except.txt echo echo ALL TESTS PASSED diff --git a/src/run.bat b/src/run.bat index c7b9b9c5a9..6f8ab0e7d6 100644 --- a/src/run.bat +++ b/src/run.bat @@ -121,7 +121,7 @@ set GOMAXPROCS=%OLDGOMAXPROCS% set OLDGOMAXPROCS= echo # Checking API compatibility. -go tool api -c ..\api\go1.txt -next ..\api\next.txt -except ..\api\except.txt +go tool api -c ..\api\go1.txt,..\api\go1.1.txt -next ..\api\next.txt -except ..\api\except.txt if errorlevel 1 goto fail echo. |
