Packages were not being created for all types.Packages, specifically, indirectly imported packages were missing. (*Program).CreatePackages now iterates over the type-checker's package map too. Also: removed all concurrency from importer. I think it was incorrect (and hard to fix). Also: change LoadInitialPackages so that all named packages are loaded from source. This happens regardless of whether GCImporter is used to satisfy imports. Details: - importer.Config.SourceImports flag determines whether to load all packages from *.go source. (Before, this was indicated by Config.Build != nil.) - importer.Config.Build field effectively defaults to &go/build.Default. A zero importer.Config is now usable. - importer.Importer.Config field is now exported. - LoadPackage renamed to ImportPackage since the resulting packages may come from GCImporter (and be incomplete). - doImport and ImportPackage fused. Fixes golang/go#7028 R=gri, axwalk CC=golang-codereviews https://golang.org/cl/48770043 |
||
|---|---|---|
| astutil | ||
| blog | ||
| call | ||
| cmd | ||
| cover | ||
| dashboard | ||
| go | ||
| godoc | ||
| importer | ||
| imports | ||
| oracle | ||
| playground | ||
| pointer | ||
| present | ||
| ssa | ||
| .hgignore | ||
| AUTHORS | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README | ||
| codereview.cfg | ||
README
This subrepository holds the source for various packages and tools that support the Go programming language. Some of the tools, godoc and vet for example, are included in binary Go distributions. Others, including the Go oracle and the test coverage tool, can be fetched with "go get". Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs. To submit changes to this repository, see http://golang.org/doc/contribute.html.