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

Develop: Go layer tools doesn't work #10867

Closed
vbauerster opened this issue Jun 13, 2018 · 7 comments
Closed

Develop: Go layer tools doesn't work #10867

vbauerster opened this issue Jun 13, 2018 · 7 comments

Comments

@vbauerster
Copy link

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)
  • System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2
@ljupchokotev
Copy link
Contributor

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.

@syl20bnr
Copy link
Owner

Closing as duplicates of #10851

@patrick-motard
Copy link

@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.

@ljupchokotev
Copy link
Contributor

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

@patrick-motard
Copy link

@ljupchokotev I'm not seeing anything in DOCUMENTATION.org 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?

@Miciah
Copy link
Contributor

Miciah commented Sep 4, 2018

@patrick-motard, make sure you are looking at the documentation for the develop branch: https://github.com/syl20bnr/spacemacs/blob/develop/doc/DOCUMENTATION.org#environment-variables-and-path

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.

@krizex
Copy link
Contributor

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
Projects
None yet
Development

No branches or pull requests

6 participants