1
0
mirror of https://github.com/golang/go synced 2024-10-01 13:18:33 -06:00
Commit Graph

13 Commits

Author SHA1 Message Date
Josh Bleecher Snyder
a06a922acc imports: update zstdlib to Go 1.12
Change-Id: Ie70c3d060de9c2e5d3404e073bdc20defdc46357
Reviewed-on: https://go-review.googlesource.com/c/160183
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-30 01:50:43 +00:00
Heschi Kreinick
5bbcdc1565 imports: redesign fixImports
Redesign fixImports to have a clearer workflow, and hopefully create
clear places to plug in go/packages. This change is mostly
performance/functionality neutral, but does clean up some corner cases.

The new flow centers around the pass type, which encapsulates the
process of loading information about the current code, adding possible
new imports, and trying to apply them. I'm hoping that it's easy to
understand what's happening just by reading fixImports, and that new
sources of information (e.g. a network service) fit well into that flow.

Where possible, I left the functions near where they were extracted in
hopes of making review easier, but it's probably not going to be easy.
Sorry. I might move them into a more reasonable order in a followup CL.

Notable modifications:
- The stdlib cache is restructured to match pass' internal storage.
- Sibling imports with conflicting names are considered.
- Package name lookups are batched, hopefully making it easier to plug
in go/packages.

Questions that might be worth answering:
- Should findImportGoPath really scan $GOROOT? Unless the user is working
on a development copy, it's totally redundant with the cache.
- What is the best way to combine candidates from multiple sources?
Right now the first one wins, and findStdlibCandidates relies on that
to get crypto/rand ahead of math/rand.
- In the third pass, should it assume sibling imports or should it
actually go load the exports? It didn't load them before, but that seems
arbitrary.

Change-Id: Ie4ad0b69bfbe9b16883f2b0517b1278575c9f540
Reviewed-on: https://go-review.googlesource.com/c/150339
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-12-03 18:26:12 +00:00
Dmitri Shuralyov
becf93d7cf imports: update zstdlib to Go 1.11
Go 1.11 has been released; it's time to update zstdlib so
imports knows about API additions that went into Go 1.11.

Unfortunately, this does not include the syscall/js package
that was added in Go 1.11 for WebAssembly. This is because
it's not included in the GOROOT/api/go1.11.txt file. Getting
it into imports can/will be done in a future CL (after some
discussion of the best way to do it).

Previously:

-	https://golang.org/cl/93195 (Go 1.10)
-	https://golang.org/cl/49150 (Go 1.9)

Updates golang/go#27590.

Change-Id: I229d7c0a658b0d8090b58cfe844c95b4cb0b2212
Reviewed-on: https://go-review.googlesource.com/134176
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-09-10 04:49:24 +00:00
Josh Bleecher Snyder
95b47aa5df imports: update zstdlib to Go 1.10
Change-Id: I36e7a5638de2cdcd3523bb3c6c89399586aab938
Reviewed-on: https://go-review.googlesource.com/93195
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-02-10 03:09:51 +00:00
Josh Bleecher Snyder
478150226d imports: update zstdlib to Go 1.9
We're at beta 2 already, so the API is likely stable.
If anything gets rolled back, we can update imports again.

Change-Id: I87e0adde062e45cab16e2bee2f929c1ac1bb828d
Reviewed-on: https://go-review.googlesource.com/49150
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-17 03:03:41 +00:00
Kevin Burke
620ecdb8d7 all: apply new machine-generated doc spec to files
Updates golang/go#13560.

Change-Id: I1664807a065c7982a57d4dc9cee22ce261536c5b
Reviewed-on: https://go-review.googlesource.com/39202
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-01 01:24:29 +00:00
Chris Broadfoot
f7f4b0b08a imports: update zstdlib to Go 1.8
Change-Id: I22d9e395bb901ba0c2d949a464228b46911c9405
Reviewed-on: https://go-review.googlesource.com/37139
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-16 21:22:49 +00:00
Brad Fitzpatrick
3fe2afc9e6 imports: update zstdlib to Go 1.7
Change-Id: I936c6f03e8c3dc14832c8493937fdb64e6d1a853
Reviewed-on: https://go-review.googlesource.com/27079
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-08-15 22:30:11 +00:00
Josh Bleecher Snyder
1727758746 imports: add unsafe symbols to zstdlib
Change-Id: Ia5856e2197925671ebaa5e673af3e97fad1cdaee
Reviewed-on: https://go-review.googlesource.com/24463
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-06-24 22:29:30 +00:00
Konstantin Shaposhnikov
d4437bf597 imports: add go:generate directive for generating zstdlib.go
Change-Id: I8c54e01799f690819cda746ad5fb7c4d87e769c4
Reviewed-on: https://go-review.googlesource.com/22541
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-29 02:56:15 +00:00
Konstantin Shaposhnikov
e48e17a0b5 imports: update static stdlib index to go1.6
Change-Id: Ie19594472ec0fa2455a3f1aeac681e74eb3a6b0b
Reviewed-on: https://go-review.googlesource.com/22539
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-28 14:59:03 +00:00
Andrew Gerrand
d868c356db imports: update static stdlib index to go1.5
Fixes golang/go#12609

Change-Id: Ic7efa796d50037a3b0fbf87a748c07bd41f07e02
Reviewed-on: https://go-review.googlesource.com/14576
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-09-15 05:17:18 +00:00
Brad Fitzpatrick
eda00ba4ec imports: bake in the standard library again
Fast path for the common case. Avoids scanning GOPATH usually.

LGTM=r, crawshaw
R=david.crawshaw, adg, r, crawshaw
CC=golang-codereviews
https://golang.org/cl/56820043
2014-01-26 09:47:31 -08:00