-
Notifications
You must be signed in to change notification settings - Fork 287
Outline not working as expected for custom build tag #222
Comments
Hum, I didn't noticed that issue before. The thing is, the build command does not affect how guru is called, so We could add an option to pass a -tags parameter to guru, but I think that's not very appropriate. What if different go files have different build tags. We would need to configure tags for each individually. |
I'm trying to think of a better workaround for Goclipse. Perhaps best is to scan the start of the Go file, see if there is any "// +build" command, remove that line if there is one (in a temporary Go file), and call guru describe on that file. |
I also just ran into this issue, an error like this one: Kept being generated. This was super confusing until I found this issue. It would sound like the temporary file missing some of the //build lines would be the most simple way forward. |
Same problem here. I find that any file contains "import C" will fail to show outline. |
@lazytiger your problem is different, see #176 . That one I'm afraid cannot be fixed on Goclipse side. |
I am using custom build tag in some of my GO files. The issue is that "Outline" panel in Eclipse shows error when the build tag is enabled. I was expecting "Outline" not to show error irrespective of the tag is // +build local or // +build !local
Is there a setting that I am missing or is this a bug?
Build Command:
${GO_TOOL_PATH} install -tags local -v -gcflags "-N -l" github.com/nirajbhatt7/Sample
sample.go
// +build local
Note: There is a blank line after the build. This builds the project and includes the sample.go but the "Outline" in Eclipse shows an error "Error parsing 'guru describe' result, for source structure update package ......"
sample.go
// +build !local
Note: This builds the project and does not include the sample.go. "Outline" in Eclipse does not show any error.
The text was updated successfully, but these errors were encountered: