mirror of
https://github.com/golang/go
synced 2024-11-21 22:14:41 -07:00
api: add go1.1.txt; update cmd/api to use it
R=golang-dev, adg, r CC=golang-dev https://golang.org/cl/9250043
This commit is contained in:
parent
f322c78692
commit
9e93d5014e
1773
api/go1.1.txt
Normal file
1773
api/go1.1.txt
Normal file
File diff suppressed because it is too large
Load Diff
1767
api/next.txt
1767
api/next.txt
File diff suppressed because it is too large
Load Diff
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user