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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop: Go layer tools doesn't work #10867

vbauerster opened this issue Jun 13, 2018 · 7 comments


Copy link

@vbauerster vbauerster commented Jun 13, 2018

Description :octocat:

It seems that Go's layer tools don't see a $GOPATH env variable.
I came to this conclusion, because none of the Go tool is working, on develop branch: 8754b24

Everything was working here: 7944ed2

Reproduction guide 馃悶

  • Start Emacs
  • Open any go file with imports from std lib.
  • Turn on syntax checking SPC t s

Observed behaviour: 馃憖 馃挃
All imports of std lib are error highlighted, saying package not found.

Expected behaviour: 鉂わ笍 馃槃
Import of std lib packages should always be found and not error highlighted.

System Info 馃捇

  • OS: darwin
  • Emacs: 26.1
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. 8754b24)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(helm emacs-lisp org git
      (version-control :variables version-control-diff-side 'left)
      (auto-completion :variables auto-completion-return-key-behavior nil auto-completion-tab-key-behavior 'cycle auto-completion-enable-help-tooltip 'manual)
      (syntax-checking :variables syntax-checking-enable-by-default nil)
      (spell-checking :variables spell-checking-enable-by-default nil)
      html markdown neotree yaml python java javascript rust
      (go :variables go-tab-width 4 gofmt-command "goimports" go-use-gometalinter t godoc-at-point-function 'godoc-gogetdoc)
      protobuf docker themes-megapack dash semantic
      (ranger :variables ranger-show-preview t ranger-show-literal t)
      (shell :variables shell-default-shell 'eshell shell-default-height 30 shell-default-position 'bottom)
      shell-scripts slack)

This comment has been minimized.

Copy link

@ljupchokotev ljupchokotev commented Jun 13, 2018

This is because of the new env-vars cache. The solution for this is to open the .emacs.d/.cache/.env-vars file and manually set GOROOT and GOPATH there.

This is probably going to be fixed, syl20bnr is already aware that it's buggy.


This comment has been minimized.

Copy link

@syl20bnr syl20bnr commented Jun 14, 2018

Closing as duplicates of #10851


This comment has been minimized.

Copy link

@patrick-motard patrick-motard commented Sep 3, 2018

@ljupchokotev I don't have a file in .emacs.d/.cache/.en-vars. Perhaps it was never created since i started from a clean install on the dev branch? What do the contents of that file look like? I don't mind editing it manually to get the go layer working while I wait for this to be patched.


This comment has been minimized.

Copy link

@ljupchokotev ljupchokotev commented Sep 3, 2018

@patrick-motard Check the documentation about environment variables in Spacemacs. You can initialize that file yourself.


This comment has been minimized.

Copy link

@patrick-motard patrick-motard commented Sep 4, 2018

@ljupchokotev I'm not seeing anything in regarding this file or how to initialize it, nor environment variables except for a brief mention of SPACEMACSDIR. Is there another location for documentation where I should be looking?


This comment has been minimized.

Copy link

@Miciah Miciah commented Sep 4, 2018

@patrick-motard, make sure you are looking at the documentation for the develop branch:

I think ljupchokotev was referring to .spacemacs.env. The related key bindings are SPC f e e to edit .spacemacs.env, SPC f e C-e to re-initialize it from the current environment, and SPC f e E to reload it.


This comment has been minimized.

Copy link

@krizex krizex commented Apr 26, 2019

@Miciah Your message saves my life, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
6 participants
You can鈥檛 perform that action at this time.