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
Thanks for reporting this and apologies for the delay. I can reproduce this and this looks indeed like a bug:
> src gri$ mkdir one
> src gri$ cd one
> one gri$ cat - > one.go
// src/one/one.go
package one
import "two"
type A two.A
> one gri$ cd ..
> src gri$ mkdir two
> src gri$ cd two
> two gri$ cat - > two.go
// src/two/two.go
package two
import "encoding/json"
type A struct {
b *B
json json.RawMessage
}
type B struct {
a A
}
> two gri$ go build
> two gri$ go install
> two gri$ cd ../one
> one gri$ go build
> one gri$ go install
> one gri$ cd ..
> src gri$ mkdir zero
> src gri$ cd zero
> zero gri$ cat - > zero.go
package zero
import "one"
> zero gri$ gotype zero.go
zero.go:3:8: could not import one (reading export data: /Users/gri/go/pkg/darwin_amd64/one.a: import error /Users/gri/go/pkg/darwin_amd64/one.a:3:86 (byte offset = 115): encoding/json package not found)
see https://github.com/jonasi/golang-import-error for a repro repo
go version: happens on both
go version go1.5.2 darwin/amd64
andgo version devel +e05b48e Thu Dec 10 08:04:07 2015 +0000 darwin/amd64
Given the following packages:
go install one
works fine, but usinggo/importer
to importone
will fail. Importing packagetwo
will work fine.The error returned is:
The text was updated successfully, but these errors were encountered: