KyleBanks / goggles

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

`//+build ignore` tags not taken into consideration #37

Closed mewmew closed 7 years ago

mewmew commented 7 years ago

This issue may be difficult to reproduce, however I'll try to describe the observed behaviour of goggles.

The ir package of llir/llvm uses go generate to run the gen.go source file, to generating the source code of binary and bitwise instruction data representations.

When viewing the documentation for llir/llvm/ir the documentation of package ir is sometimes displayed, and sometimes, the documentation of package main is displayed.

Documentation of the gen tool displayed instead of the package documentation

Note, that gen.go contains a //+build ignore tag, which I think is what makes godoc skip this file when generating documentation. As a user of goggles, I would expect these kind of files to be ignored, so that the relevant documentation is displayed.

It may be worth taking a look at, and potentially using the go/build package which provides native support for handling build tags (along with support for dealing with multiple GOPATHs).

KyleBanks commented 7 years ago

Wow, this is another good find. Goggles already uses go/build actually so I'm a little surprised this isn't already handled, but I'll dig into it some more and see if there's anything I may have missed in the docs.

KyleBanks commented 7 years ago

Actually that's not true - Goggles uses KyleBanks/depth which uses go/build so I may have to make the change over there.

KyleBanks commented 7 years ago

Resolved by c080d80ef179b30eeda405c9b7726535e40c8027