Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

go-plus attempts to update tools/packages every time it is launched #1020

Open
7 tasks done
dhazeghi opened this issue Apr 24, 2020 · 11 comments
Open
7 tasks done

go-plus attempts to update tools/packages every time it is launched #1020

dhazeghi opened this issue Apr 24, 2020 · 11 comments

Comments

@dhazeghi
Copy link

Prerequisites

  • Have you tried launching atom . from the terminal in your project's directory? Yes
  • Have you verified the output from go env is correct? If it is, please include the output in this issue.
  • Have you updated Atom to the latest version? Yes
  • Have you tried using Atom Beta, which can be run side-by-side with Atom Stable? Is the behavior the same, or different? Same
  • Have you updated your Atom packages to the latest versions? Yes
  • Have you read the FAQ? Yes
  • Have you searched the issues to see if others are experiencing the same issue? Yes

Description

[Description of the bug or feature]

Output from atom -v && apm -v

Atom : 1.45.0
Electron: 4.2.7
Chrome : 69.0.3497.128
Node : 10.11.0
apm 2.4.3
npm 6.2.0
node 10.2.1 x64
atom 1.45.0
python 2.7.16
git 2.20.1

Output From go env

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/dara/Library/Caches/go-build"
GOENV="/Users/dara/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/dara/Desktop/test"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/43/s55553mj4fxbxtd4jws4fqtw0000gn/T/go-build424140330=/tmp/go-build -gno-record-gcc-switches -fno-common"

Steps to Reproduce

  1. Open Atom
  2. Open .go file
  3. go-plus console shows it updating a whole bunch of packages:

$ go get -u golang.org/x/tools/cmd/goimports
$ go get -u golang.org/x/tools/cmd/gorename
$ go get -u github.com/sqs/goreturns
$ go get -u github.com/mdempsky/gocode
$ go get -u github.com/alecthomas/gometalinter
$ go get -u github.com/mgechev/revive
$ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
$ go get -u github.com/zmb3/gogetdoc
$ go get -u github.com/zmb3/goaddimport
$ go get -u github.com/rogpeppe/godef
$ go get -u golang.org/x/tools/cmd/guru
$ go get -u github.com/fatih/gomodifytags
$ go get -u github.com/tpng/gopkgs
$ go get -u github.com/ramya-rao-a/go-outline

Expected Behavior

After the first launch, I don't expect go-plus to retry updating the same packages every time Atom comes up.

Actual Behavior

Every single time, it updates the same set of packages. Takes 2-3 minutes.

Screen Shot 2020-04-24 at 4 45 36 PM

@ibmboy19
Copy link

ibmboy19 commented May 7, 2020

I meet the same issue.

@ghost
Copy link

ghost commented May 12, 2020

I cannot figure out where the break happened. I recently hopped distro on my laptop and ran into this problem on Fedora 32 with Atom 1.46, but I didn't have this problem on Debian 10 at the time.

Since Atom isn't in the repo on Debian, I am not 100% of the version I had installed but I tested as far back as I certain the version I was using on Debian; back to Atom 1.44. I did a fresh install of Debian and Atom with a new user and the issue exists in all.

I also tried different Go versions 1.14 and 1.13.

@thanhphuoc95
Copy link

Same issue. I had to switch to vscode cause this issue :( Any answer, pls ?

@CJK-Regan
Copy link

Same issue.

@dkotik
Copy link

dkotik commented May 22, 2020

If you uninstall go-plus and try to re-install it, it will fail saying "core-js" is outdated - this issue seems to be related to the other one with the failing installation. I got a fork from from that ticket. Also removed the following line from /home/fray/Desktop/go-plus/lib/package-manager.js:

['golangci-lint', 'github.com/golangci/golangci-lint/cmd/golangci-lint'],

There appears to be a fluke in a vendored package used by "golangci-link" linter. It failed to install every time, forcing atom to attemp re-installing on every launch. Pick a different linter in the options, remove the line as I did and it stops trying to re-install everything on launch.

@darfux
Copy link

darfux commented May 29, 2020

I solved similar issue by adding disableToolCheck: true manually to the go-plus config in .atom/config.cson:

  "go-plus":
    disableToolCheck: true

The related code is

constructor(goconfig: GoConfig, goget: GoGet) {
this.loaded = false
this.goconfig = goconfig
this.goget = goget
this.subscriptions = new CompositeDisposable()
if (atom.config.get('go-plus.disableToolCheck')) {
this.loaded = true
return
}

@ghost
Copy link

ghost commented Jun 13, 2020

If you uninstall go-plus and try to re-install it, it will fail saying "core-js" is outdated - this issue seems to be related to the other one with the failing installation. I got a fork from from that ticket. Also removed the following line from /home/fray/Desktop/go-plus/lib/package-manager.js:

['golangci-lint', 'github.com/golangci/golangci-lint/cmd/golangci-lint'],

There appears to be a fluke in a vendored package used by "golangci-link" linter. It failed to install every time, forcing atom to attemp re-installing on every launch. Pick a different linter in the options, remove the line as I did and it stops trying to re-install everything on launch.

I had seen this error when I did a reinstall but I am way too ignorant of how packages in Atom work to actually trace the error. I like commenting out a misbehaving package over disabling checks personally.

@vsile
Copy link

vsile commented Jul 14, 2020

I have the same issue.

@xsubject
Copy link

I also suffer because of this

@xsubject
Copy link

image
And nothing works ... (gopath is correct)

@damz
Copy link

damz commented Oct 7, 2020

I am seeing this issue too. go-plus runs go get on all the tools (which is a no-op, but is still not extremely fast) unconditionally.

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

No branches or pull requests

10 participants