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

GoGuru [ERROR]: ('guru: no identifier here\n',) #44

Closed
Fentonz opened this issue Nov 26, 2019 · 9 comments
Closed

GoGuru [ERROR]: ('guru: no identifier here\n',) #44

Fentonz opened this issue Nov 26, 2019 · 9 comments

Comments

@Fentonz
Copy link

Fentonz commented Nov 26, 2019

I am using Sublimetext 3 with few plugins to help me write code. GoGuru is one of them, but after the weekend i noticed that GoGuru and gometalinter were not working properly anymore.

I have setup a shortcut key "CTRL+D" to go to definition, which displays following error: "GoGuru [ERROR]: ('guru: no identifier here\n',)". I did notice something strange. When i attempt to go to definition of getSession, it opens the PostFormValue function from request.go, which is definetly not what i was looking for. So i guess, it means that goguru cursor location is different from the real one. I am really lost here, updated everything, reinstalled Sublime, still same errors. This happens on both of my computers.

image

@Fentonz Fentonz closed this as completed Nov 26, 2019
@Fentonz Fentonz reopened this Nov 26, 2019
@alvarolm
Copy link
Owner

hi @Fentonz !
in fact during the weekend i had to implement the modified flag due to performance penalties (when go modules is involved in guru queries) and to allow reading from editor buffer and not the file.

eb67f4f

first I recommend you to enable deugging, to do so set to true "goguru_debug" flag at the user settings:
preferences > package settings > GoGuru > Settings - User
then copy/paste the lines from the console that start with: GoGuru [DEBUG]

this issue always happens or sometimes?

@alvarolm
Copy link
Owner

@Fentonz you may have using a bugged version 0.1.19 or 0.1.20 (confirm with the logs), if so please update to the latest (0.1.20)

@Fentonz
Copy link
Author

Fentonz commented Nov 27, 2019

Hope it helps

GoGuru [DEBUG]: ('cmd_env', {'PROGRAMFILES': 'C:\Program Files', 'LOCALAPPDATA': 'C:\Users\Fenton\AppData\Local', 'ALLUSERSPROFILE': 'C:\ProgramData', 'FPS_BROWSER_APP_PROFILE_STRING': 'Internet Explorer', 'OS': 'Windows_NT', 'SYSTEMROOT': 'C:\Windows', 'COMMONPROGRAMW6432': 'C:\Program Files\Common Files', 'COMSPEC': 'C:\Windows\system32\cmd.exe', 'USERDOMAIN': 'FENTONPC', 'APPDATA': 'C:\Users\Fenton\AppData\Roaming', 'WINDIR': 'C:\Windows', 'TMP': 'C:\Users\Fenton\AppData\Local\Temp', 'LOGONSERVER': '\\FENTONPC', 'PSMODULEPATH': 'C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules', 'PROCESSOR_REVISION': '0802', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'SYSTEMDRIVE': 'C:', 'TEMP': 'C:\Users\Fenton\AppData\Local\Temp', 'USERDOMAIN_ROAMINGPROFILE': 'FENTONPC', 'DRIVERDATA': 'C:\Windows\System32\Drivers\DriverData', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PROCESSOR_LEVEL': '23', 'FPS_BROWSER_USER_PROFILE_STRING': 'Default', 'SESSIONNAME': 'Console', 'COMMONPROGRAMFILES': 'C:\Program Files\Common Files', 'PROCESSOR_IDENTIFIER': 'AMD64 Family 23 Model 8 Stepping 2, AuthenticAMD', 'PROGRAMFILES(X86)': 'C:\Program Files (x86)', 'USERPROFILE': 'C:\Users\Fenton', 'PROGRAMW6432': 'C:\Program Files', 'PATH': 'C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\cygwin64\home\Fenton\go\bin;C:\cygwin64\home\Fenton\scripts;C:\cygwin64\bin;C:\Program Files\Git\cmd;C:\Go\bin;C:\Users\Fenton\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\Fenton\AppData\Local\Programs\Python\Python37-32\;C:\Users\Fenton\AppData\Local\Microsoft\WindowsApps;C:\Users\Fenton\go\bin', 'HOMEPATH': '\Users\Fenton', 'PUBLIC': 'C:\Users\Public', 'HOMEDRIVE': 'C:', 'GOPATH': 'C:\cygwin64\home\Fenton\go', 'COMPUTERNAME': 'FENTONPC', 'OPENSSL_CONF': 'C:\Program Files\OpenSSL-Win64\bin\openssl.cfg', 'ONEDRIVE': 'C:\Users\Fenton\OneDrive', 'NUMBER_OF_PROCESSORS': '12', 'COMMONPROGRAMFILES(X86)': 'C:\Program Files (x86)\Common Files', 'PROGRAMDATA': 'C:\ProgramData', 'GOROOT': 'C:\Go\', 'USERNAME': 'Fenton'})
GoGuru [DEBUG]: ('goguru_env', {})
GoGuru [DEBUG]: ('final_env', {'PROGRAMFILES': 'C:\Program Files', 'LOCALAPPDATA': 'C:\Users\Fenton\AppData\Local', 'ALLUSERSPROFILE': 'C:\ProgramData', 'FPS_BROWSER_APP_PROFILE_STRING': 'Internet Explorer', 'OS': 'Windows_NT', 'SYSTEMROOT': 'C:\Windows', 'COMMONPROGRAMW6432': 'C:\Program Files\Common Files', 'COMSPEC': 'C:\Windows\system32\cmd.exe', 'USERDOMAIN': 'FENTONPC', 'APPDATA': 'C:\Users\Fenton\AppData\Roaming', 'WINDIR': 'C:\Windows', 'TMP': 'C:\Users\Fenton\AppData\Local\Temp', 'LOGONSERVER': '\\FENTONPC', 'PSMODULEPATH': 'C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules', 'PROCESSOR_REVISION': '0802', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'SYSTEMDRIVE': 'C:', 'TEMP': 'C:\Users\Fenton\AppData\Local\Temp', 'USERDOMAIN_ROAMINGPROFILE': 'FENTONPC', 'DRIVERDATA': 'C:\Windows\System32\Drivers\DriverData', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PROCESSOR_LEVEL': '23', 'FPS_BROWSER_USER_PROFILE_STRING': 'Default', 'SESSIONNAME': 'Console', 'COMMONPROGRAMFILES': 'C:\Program Files\Common Files', 'PROCESSOR_IDENTIFIER': 'AMD64 Family 23 Model 8 Stepping 2, AuthenticAMD', 'PROGRAMFILES(X86)': 'C:\Program Files (x86)', 'USERPROFILE': 'C:\Users\Fenton', 'PROGRAMW6432': 'C:\Program Files', 'PATH': 'C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\cygwin64\home\Fenton\go\bin;C:\cygwin64\home\Fenton\scripts;C:\cygwin64\bin;C:\Program Files\Git\cmd;C:\Go\bin;C:\Users\Fenton\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\Fenton\AppData\Local\Programs\Python\Python37-32\;C:\Users\Fenton\AppData\Local\Microsoft\WindowsApps;C:\Users\Fenton\go\bin', 'HOMEPATH': '\Users\Fenton', 'PUBLIC': 'C:\Users\Public', 'HOMEDRIVE': 'C:', 'GOPATH': 'C:\cygwin64\home\Fenton\go', 'COMPUTERNAME': 'FENTONPC', 'OPENSSL_CONF': 'C:\Program Files\OpenSSL-Win64\bin\openssl.cfg', 'ONEDRIVE': 'C:\Users\Fenton\OneDrive', 'NUMBER_OF_PROCESSORS': '12', 'COMMONPROGRAMFILES(X86)': 'C:\Program Files (x86)\Common Files', 'PROGRAMDATA': 'C:\ProgramData', 'GOROOT': 'C:\Go\', 'USERNAME': 'Fenton'})
GoGuru [DEBUG]: ('goguru_use_current_package', True)
GoGuru [DEBUG]: ('GOPATH', 'C:\cygwin64\home\Fenton\go')
GoGuru [DEBUG]: ('local_package', '')
GoGuru [DEBUG]: ('guru_scope', ',')
GoGuru [DEBUG]: ('cmd', 'guru -modified -scope , -tags "" definition C:\cygwin64\home\Fenton\go\src\not-important\not-important2\not-important3\auth.go:#547')
GoGuru [ERROR]: ('guru: no identifier here\n',)

@Fentonz
Copy link
Author

Fentonz commented Nov 27, 2019

@Fentonz you may have using a bugged version 0.1.19 or 0.1.20 (confirm with the logs), if so please update to the latest (0.1.20)

I have 0.1.21

@alvarolm
Copy link
Owner

mate,
cant see if the byte offset (#n) is correct since you have not provided the buffer, please do so.
this always happens ? it seems that the buffer is modified midway during the offset calculation.

@alvarolm
Copy link
Owner

alvarolm commented Nov 27, 2019

if you wanna dive in to the plugin, here's a good start:
https://github.com/alvarolm/GoGuru/blob/0.1.21/goGuru.py#L108
remember to use debug() if necessary, it should be easy to pin point the issue, have no been able to replicate

@Fentonz
Copy link
Author

Fentonz commented Dec 12, 2019

mate,
cant see if the byte offset (#n) is correct since you have not provided the buffer, please do so.
this always happens ? it seems that the buffer is modified midway during the offset calculation.

What do you mean by 'buffer'? If i set "goguru_output": to "buffer" and try again, the only thing i get is:
"Running guru definition command...

guru: no identifier here
"

@alvarolm
Copy link
Owner

@Fentonz guru determines the symbol (type, variable, etc..) you want to query by calculating the offset in respect to the 'file' that your working on, now since goguru uses the "-modified" flag instead of referencing the file sublime provides the content of the file that you are working on, this content is what I call the buffer

@alvarolm
Copy link
Owner

and I repeat, I have not been able to reproduce the issue so please I ask you to provide more details, please take a look at my previous comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants