You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just got this email from the golang-announce list. SG, Walrus and go-couchbase use some of these packages and should be updated.
As a prelude to the Go 1.4 release, the Go sub-repositories (go.tools, go.net, go.crypto, and so on) will be made available using custom import paths. See golang.org/s/go14subrepo for background.
This list shows the current base import paths, and their new equivalents.
The "x" in the path serves to disambiguate these external packages from the standard library.
If your code imports packages from these repositories, please prepare changes to update the import paths, and commit those changes either before or shortly after the official repositories are renamed. (These new import paths work today, but the code in those repositories has not yet been updated to use them.)
The change will be made on Sunday, November 9, 2014.
Updating
Any import path in any Go source file beginning with “code.google.com/p/go.” should change to begin with “golang.org/x/”.
On Linux, OS X, and other Unix systems, this command updates all Go source files in the current directory and all subdirectories, so running it in your GOPATH workspace root should suffice to update all your source code:
sed -i .orig 's|"code\.google\.com/p/go\.|"golang.org/x/|' \
$(find . -name '*.go')
Potential issues
After the change, code that uses the old import paths will not break. Instead, two copies of a given repository may be created inside your workspace.
For example, the "code.google.com/p/go.tools/go/ssa" package depends on "code.google.com/p/go.tools/go/types". After the change, these two paths will become "golang.org/x/tools/go/ssa" and "golang.org/x/tools/go/types", and the import statement in package ssa will be updated accordingly.
If your code imports the ssa package using its old path, when the import paths are changed the dependency graph will look like this:
your package -> "code.google.com/p/go.tools/go/ssa" -> "golang.org/x/tools/go/types"
If you run "go get", it will check out two copies of the go.tools repository: one under the old path, and one under the new path. If your program also contains references to "code.google.com/p/go.tools/go/types", you will end up with both copies of the go/types package (with different import paths) in the same executable.
To fix this, update the import statements in your code to use the new paths and then delete the old "src/code.google.com/p/go.*" directories from your workspace.
The text was updated successfully, but these errors were encountered:
Had a look at this today, but hit a blocker as a few of the new golang.org/x/ libraries that we use still include references to the old code.google.com/p/ equivalents, which introduced build issues when I tried to pull out the old references.
e.g.
building SG:
golang.org/x/crypto/bcrypt/bcrypt.go:11:2: cannot find package "code.google.com/p/go.crypto/blowfish"
I just got this email from the golang-announce list. SG, Walrus and go-couchbase use some of these packages and should be updated.
As a prelude to the Go 1.4 release, the Go sub-repositories (go.tools, go.net, go.crypto, and so on) will be made available using custom import paths. See golang.org/s/go14subrepo for background.
This list shows the current base import paths, and their new equivalents.
code.google.com/p/go.benchmarks -> golang.org/x/benchmarks
code.google.com/p/go.blog -> golang.org/x/blog
code.google.com/p/go.crypto -> golang.org/x/crypto
code.google.com/p/go.exp -> golang.org/x/exp
code.google.com/p/go.image -> golang.org/x/image
code.google.com/p/go.mobile -> golang.org/x/mobile
code.google.com/p/go.net -> golang.org/x/net
code.google.com/p/go.sys -> golang.org/x/sys
code.google.com/p/go.talks -> golang.org/x/talks
code.google.com/p/go.text -> golang.org/x/text
code.google.com/p/go.tools -> golang.org/x/tools
The "x" in the path serves to disambiguate these external packages from the standard library.
If your code imports packages from these repositories, please prepare changes to update the import paths, and commit those changes either before or shortly after the official repositories are renamed. (These new import paths work today, but the code in those repositories has not yet been updated to use them.)
The change will be made on Sunday, November 9, 2014.
Updating
Any import path in any Go source file beginning with “code.google.com/p/go.” should change to begin with “golang.org/x/”.
On Linux, OS X, and other Unix systems, this command updates all Go source files in the current directory and all subdirectories, so running it in your GOPATH workspace root should suffice to update all your source code:
Potential issues
After the change, code that uses the old import paths will not break. Instead, two copies of a given repository may be created inside your workspace.
For example, the "code.google.com/p/go.tools/go/ssa" package depends on "code.google.com/p/go.tools/go/types". After the change, these two paths will become "golang.org/x/tools/go/ssa" and "golang.org/x/tools/go/types", and the import statement in package ssa will be updated accordingly.
If your code imports the ssa package using its old path, when the import paths are changed the dependency graph will look like this:
If you run "go get", it will check out two copies of the go.tools repository: one under the old path, and one under the new path. If your program also contains references to "code.google.com/p/go.tools/go/types", you will end up with both copies of the go/types package (with different import paths) in the same executable.
To fix this, update the import statements in your code to use the new paths and then delete the old "src/code.google.com/p/go.*" directories from your workspace.
The text was updated successfully, but these errors were encountered: