mirror of
https://github.com/golang/go
synced 2024-11-18 02:54:47 -07:00
c56cc9b3b5
Currently, we don't have package testing to import package regexp directly, because then regexp can't have internal tests (or at least they become more difficult to write), for fear of an import cycle. The solution we've been using is for the generated test main package (pseudo-import path "testmain", package main) to import regexp and pass in a matchString function for use by testing when implementing the -run flags. This lets testing use regexp but without depending on regexp and creating unnecessary cycles. We want to add a few dependencies to runtime/pprof, notably regexp but also compress/gzip, without causing those packages to have to work hard to write internal tests. Restructure the (dare I say it) dependency injection of regexp.MatchString to be more general, and use it for the runtime/pprof functionality in addition to the regexp functionality. The new package testing/internal/testdeps is the root for the testing dependencies handled this way. Code using testing.MainStart will have to change from passing in a matchString implementation to passing in testdeps.TestDeps{}. Users of 'go test' don't do this, but other build systems that have recreated 'go test' (for example, Blaze/Bazel) may need to be updated. The new testdeps setup should make future updates unnecessary, but even so we keep the comment about MainStart not being subject to Go 1 compatibility. Change-Id: Iec821d2afde10c79f95f3b23de5e71b219f47b92 Reviewed-on: https://go-review.googlesource.com/32455 Reviewed-by: Ian Lance Taylor <iant@golang.org> |
||
---|---|---|
.. | ||
except.txt | ||
go1.1.txt | ||
go1.2.txt | ||
go1.3.txt | ||
go1.4.txt | ||
go1.5.txt | ||
go1.6.txt | ||
go1.7.txt | ||
go1.txt | ||
next.txt | ||
README |
Files in this directory are data for Go's API checker ("go tool api", in src/cmd/api). Each file is a list of API features, one per line. go1.txt (and similarly named files) are frozen once a version has been shipped. Each file adds new lines but does not remove any. except.txt lists features that may disappear without breaking true compatibility. next.txt is the only file intended to be mutated. It's a list of features that may be added to the next version. It only affects warning output from the go api tool.