d4l3k/go-pry

Can't install

hackervera opened this issue · 4 comments

hhadmin@local:~/go/src/github.com/househappy/hyper_sonic$ go get github.com/d4l3k/go-pry
# github.com/d4l3k/go-pry
../../d4l3k/go-pry/main.go:162: syntax error: unexpected range, expecting {
../../d4l3k/go-pry/main.go:167: non-declaration statement outside function body
../../d4l3k/go-pry/main.go:168: non-declaration statement outside function body
../../d4l3k/go-pry/main.go:169: non-declaration statement outside function body
../../d4l3k/go-pry/main.go:180: non-declaration statement outside function body
../../d4l3k/go-pry/main.go:181: non-declaration statement outside function body
../../d4l3k/go-pry/main.go:182: non-declaration statement outside function body
../../d4l3k/go-pry/main.go:189: non-declaration statement outside function body
../../d4l3k/go-pry/main.go:191: non-declaration statement outside function body
../../d4l3k/go-pry/main.go:196: non-declaration statement outside function body
../../d4l3k/go-pry/main.go:196: too many errors
d4l3k commented

Could you provide a few more details to the system you're running it on? I'm having a hard time reproducing it.

Letting me know the output of go version and your operating system version would be appreciated.

You could also try running:

go get -u github.com/d4l3k/go-pry

Likely that won't help, but it doesn't hurt to try.

hhadmin@local:~$ go version
go version go1.3.3 linux/amd64

hhadmin@local:~$ cat /etc/issue
Debian GNU/Linux 7 \n \l

hhadmin@local:~$ go get -u github.com/d4l3k/go-pry
# github.com/d4l3k/go-pry
go/src/github.com/d4l3k/go-pry/main.go:162: syntax error: unexpected range, expecting {
go/src/github.com/d4l3k/go-pry/main.go:167: non-declaration statement outside function body
go/src/github.com/d4l3k/go-pry/main.go:168: non-declaration statement outside function body
go/src/github.com/d4l3k/go-pry/main.go:169: non-declaration statement outside function body
go/src/github.com/d4l3k/go-pry/main.go:180: non-declaration statement outside function body
go/src/github.com/d4l3k/go-pry/main.go:181: non-declaration statement outside function body
go/src/github.com/d4l3k/go-pry/main.go:182: non-declaration statement outside function body
go/src/github.com/d4l3k/go-pry/main.go:189: non-declaration statement outside function body
go/src/github.com/d4l3k/go-pry/main.go:191: non-declaration statement outside function body
go/src/github.com/d4l3k/go-pry/main.go:196: non-declaration statement outside function body
go/src/github.com/d4l3k/go-pry/main.go:196: too many errors
d4l3k commented

I've setup a Debian install with go1.3.3 and am able to reproduce.

I've also added 1.3.3 as a build target to TravisCI:

d6d9548

https://travis-ci.org/d4l3k/go-pry/jobs/76549834

Seems like it's isolated to 1.3.3. One short term fix would be to install a newer version especially considering Go 1.5 is out.

d4l3k commented

Turns out that omiting the params in go1.3.3 throws an error.

for range make([]int, 10) {
  // This doesn't work
}
for _ = range make([]int, 10) {
  // This does
}