tools/cmd
Alan Donovan e8afbfad8c go.tools/importer: API rethink.
The Importer type has been replaced with Config and Program.

Clients populate a Config, directly or more usually via
convenience functions.  They then call its Load() method to do
all of the typechecking and transitive-closure computation.

ssa.NewProgram and ssa.CreatePackages have been fused into
ssa.Create, which now cannot fail, since (*Config).Load()
reports all type errors.

Also:
- The addition of an ssa.GlobalDebug builder mode flag
  eliminates a loop-over-packages repeated in many clients.
- PackageInfo.Err flag unexported.  Clients never see bad infos now.
- cmd/ssadump: now only looks for func "main" in package "main".
- importsOf deleted, was dead code.

STILL TODO:
- ParseFile seems like API creep (though it's convenient)
  and CreateFromFiles is dangerous (w.r.t. FileSet identity).
  Need to think more...
- the need for clients to rely on elementwise correspondence
  of Config.CreatePkgs and Program.Created is a little sad.
- The command-line interface has not changed.
  That will happen in a follow-up.
  r recommends using a repeated flag: -package p -package q ...

R=gri
CC=axwalk, frederik.zipp, golang-codereviews
https://golang.org/cl/49530047
2014-01-15 21:37:55 -05:00
..
cover go.tools/cover: split parsing code out from cmd/cover 2013-12-03 20:55:21 -08:00
godoc godoc: add ability to change or disable the display of search results. 2014-01-06 09:51:01 -05:00
goimports go.tools/cmd/goimports: Fixed url 2014-01-02 11:02:13 -08:00
gotype cmd/gotype: add -gccgo flag 2014-01-08 15:25:17 -08:00
html2article go.tools/cmd/html2article: move command from go.blog repository 2013-09-27 10:40:53 +10:00
oracle go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
ssadump go.tools/importer: API rethink. 2014-01-15 21:37:55 -05:00
vet go.tools/cmd/vet: improve error message for build tag problems 2013-12-18 16:06:56 -08:00