Also:
- remove stale comment about line numbers.
- log a warning if file's package root not found.
LGTM=bgarcia
R=bgarcia
CC=golang-codereviews
https://golang.org/cl/88510044
Otherwise on Windows the enumerated package "net\\http" will
be distinct from the imported package "net/http" leading to
strange errors. (A similar bug was fixed in go/ssa/stdlib_test.go.)
Fixesgolang/go#7189
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/86170043
These were removed when adding the -analysis flag (CL
60540044), ostensibly for performance, but I can't reproduce
the serious slowdowns I saw then. In any case, they are
needed for certain URLs.
Fixesgolang/go#7743
LGTM=bgarcia
R=bgarcia
CC=golang-codereviews
https://golang.org/cl/86150043
If $GOPATH was large, or $GOPATH was $HOME and $HOME/src had
many files, the unbounded concurrency in loadPkgIndex/loadPkg
could make the operating system unhappy with so many
threads. (sigh once again for no async file IO and needing
threads for file operations)
In addition, don't call go/build.Context.Import on directories
that we've already determined to have no go files in them.
It's just a waste of time. Makes it about 3x faster on my
machine with hot caches and a big $HOME/src.
Fixesgolang/go#7731
LGTM=iant, adg
R=golang-codereviews, iant, adg
CC=david.crawshaw, golang-codereviews
https://golang.org/cl/85670044
Side-effect: Because interfaces are now type-checked in reverse order,
cycle errors in interface declarations appear at the "end" rather than
at the "beginning" of the cycle in the source code. This is harmless.
Eventually we may want to do dependency order determination and thus
cycle detection for all types before fully type-checking them, which
might simplify some code and also produce consistently positioned cycle
errors again.
Fixesgolang/go#7158.
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/83640043
This avoids confusion when trying to read correctly
encoded export data that happens to be encoded in
a different format (debug vs product).
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/82090043
Details:
- auto-generate prefixes for std lib (e.g., "godex big" works now)
- apply filtering to package-level objects only
- nicer formatting of single-entry const, var, or type declaration
TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/81360046
- Add missing methodset.html template file.
- Suppress initial display of package callgraph.
Client-side JS will make it visible if there is data.
LGTM=bgarcia
R=crawshaw, bgarcia
CC=golang-codereviews
https://golang.org/cl/81550043
Existing tools use the default value of zero; their behaviour is unchanged.
(*Config).ParseFile is used only from tests.
LGTM=crawshaw, rsc, gri
R=crawshaw, gri, rsc
CC=golang-codereviews
https://golang.org/cl/79290044
All of these work now as expected:
godex code.google.com/p/go.tools/go/types
godex go.tools/go/types
godex go/types
godex types
Also improved logging/verbose mode.
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80930043
1) Split a path.name argument at the last '.' that
is not part of the path.
2) Try various importers always in the same order
for consistent results (use lists instead of maps).
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80790043
goimports to use the package name as a local qualifier in an import.
For example, if findImports("pkg", "X") returns ("foo/bar",
rename=true), then goimports adds the import line:
import pkg "foo/bar"
to satisfy uses of pkg.X in the file.
This change doesn't add any implementations of rename=true, though one
is sketched in a TODO.
LGTM=crawshaw
R=crawshaw, rsc
CC=bradfitz, golang-codereviews
https://golang.org/cl/76400050