KyleBanks / goggles

🔭 Goggles is a cross-platform GUI for your $GOPATH!
Apache License 2.0
671 stars 18 forks source link

Goggles crashes when a package cannot be parsed due to syntax error #31

Open integrii opened 7 years ago

integrii commented 7 years ago

Various experiments when searching other things reveals that it crashes when I select any of my private home-ai repos.

KyleBanks commented 7 years ago

Well that's no good, could you post the last 10 or so lines of ~/Library/Logs/goggles.log?

KyleBanks commented 7 years ago

I don't see it in your repository list so I'm guessing it's a private repo right?

integrii commented 7 years ago

Thanks for writing back. Sorry about the delay. I have a new son since I posted this issue.

Yes, nearly all our repos are private. Here is the crashing line from the log you mentioned. Was this trying to compile some of my code when it crashed?!

2017/04/07 20:07:19 /Users/eg/go/src/github.com/home-ai/main.go:40:1: expected operand, found '}'

I quickly ran a rm -f /Users/eg/go/src/github.com/home-ai/main.go and everything works as expected now.

Looks like for some reason it was trying to compile this random out of place main.go file?!

KyleBanks commented 7 years ago

@integrii thanks for the response and congratulations on the new baby!

Goggles doesn't compile or execute any of your code, but it does use the go/build package to parse and analyze the source code. This is the same internal package used by GoDoc, the various go commands (build, install, vet, etc), and many other tools.

If the source code can't be compiled Goggles would definitely fail to parse it, so I'm going to retitle this issue to simply ignore packages that cannot be compiled, rather than crashing.

integrii commented 7 years ago

Perfect! Thanks @KyleBanks. I love the project.

CyDoor commented 7 years ago

Kyle, first of all -> Hell i <3 Goggle Unfortunately facing the same issues -> The Term is crashing stable bin x64 on win 10 Where does the bin throwing the logs ouut :-)?

Edit:// Still dont find the logs, do i have to build it from the source to enjoy them? -> i figured out that i could scroll through my near countless sources without any problem, even searching works BUT if i search "rsa" to find the crypto/rsa source it crashes.