Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/api: Fails on brand new checkout #7248

Closed
gopherbot opened this issue Feb 3, 2014 · 9 comments
Closed

cmd/api: Fails on brand new checkout #7248

gopherbot opened this issue Feb 3, 2014 · 9 comments

Comments

@gopherbot
Copy link

by daniel@cloudflare.com:

running all.bash on a brand new checkout returns this error:

# Checking API compatibility.
Error running API checker: exit status 1
2014/02/03 08:56:45 error typechecking package crypto/x509:
/home/dmorsing/src/gotip/src/pkg/crypto/x509/pem_decrypt.go:49:14: cannot use
des.NewCipher (value of type func(key []byte) (cipher.Block, error)) as func(key []byte)
(cipher.Block, error) value in struct literal (windows-amd64)

Since that didn't make any sense, I tried deleting all installed versions of go/types.
Somehow cmd/api still manages to run and give that error, even though it's installed on
every compile.

I tried installing the cmd/api tool manually to see if I had some package somewhere that
the go tool was picking up. It gave me the following compilation errors.

# cmd/api
./goapi.go:627: invalid case ast.SEND in switch on typ.Dir() (mismatched types
ast.ChanDir and types.ChanDir)
./goapi.go:629: invalid case ast.RECV in switch on typ.Dir() (mismatched types
ast.ChanDir and types.ChanDir)
./goapi.go:652: sig.IsVariadic undefined (type *types.Signature has no field or method
IsVariadic)
./goapi.go:727: m.Obj().IsExported undefined (type types.Object has no field or method
IsExported)
./goapi.go:742: m.Obj().IsExported undefined (type types.Object has no field or method
IsExported)
./goapi.go:755: f.IsExported undefined (type *types.Var has no field or method
IsExported)
./goapi.go:775: m.IsExported undefined (type *types.Func has no field or method
IsExported)
./goapi.go:826: obj.IsExported undefined (type *types.TypeName has no field or method
IsExported)

I'm not sure how the builders are not falling over right now.
@davecheney
Copy link
Contributor

Comment 1:

The api tool requires GOROOT to be set to something, is that pointing to the correct
location ?

@gopherbot
Copy link
Author

Comment 2 by daniel@cloudflare.com:

I added a fmt.Println(goroot) inside run.go. It prints /home/dmorsing/src/gotip, which
is the folder I'm compiling in.

@davecheney
Copy link
Contributor

Comment 3:

What does env | grep GOROOT say ?

@DanielMorsing
Copy link
Contributor

Comment 4:

Blank.

@davecheney
Copy link
Contributor

Comment 5:

Then how is the API tool working? On my machine the API tool refuses to run without
GOROOT set

@DanielMorsing
Copy link
Contributor

Comment 6:

GOROOT is set when all.bash is run

@alexbrainman
Copy link
Member

Comment 7:

run.go does not use latest version of go.tools. run.go always uses a particular version
of go.toos. The version is hard coded. Perhaps the version is buggy. Update run.go with
latest go.tools version and see if it helps.
Alex

@davecheney
Copy link
Contributor

Comment 8:

Indeed you are right. My apologies. I was confused, when running ./run.bash the API tool
will fail if GOROOT isn't set.
That said, I'm still having trouble reproducing this issue.

@DanielMorsing
Copy link
Contributor

Comment 9:

Found the issue. Repo was indeed not clean.

Status changed to Retracted.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants