go-plus icon indicating copy to clipboard operation
go-plus copied to clipboard

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

Open dhazeghi opened this issue 5 years ago • 11 comments

Prerequisites

  • [x] Have you tried launching atom . from the terminal in your project's directory? Yes
  • [x] Have you verified the output from go env is correct? If it is, please include the output in this issue.
  • [x] Have you updated Atom to the latest version? Yes
  • [x] Have you tried using Atom Beta, which can be run side-by-side with Atom Stable? Is the behavior the same, or different? Same
  • [x] Have you updated your Atom packages to the latest versions? Yes
  • [x] Have you read the FAQ? Yes
  • [x] 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

dhazeghi avatar Apr 24 '20 23:04 dhazeghi

I meet the same issue.

ibmboy19 avatar May 07 '20 03:05 ibmboy19

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.

ghost avatar May 12 '20 21:05 ghost

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

thanhphuoc95 avatar May 14 '20 16:05 thanhphuoc95

Same issue.

CJK-Regan avatar May 18 '20 05:05 CJK-Regan

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.

dkotik avatar May 22 '20 20:05 dkotik

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 https://github.com/joefitzgerald/go-plus/blob/0b21c70e219bbe199d7d7b09e8c995ee7839184b/lib/package-manager.js#L62-L70

darfux avatar May 29 '20 03:05 darfux

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.

ghost avatar Jun 13 '20 19:06 ghost

I have the same issue.

vsile avatar Jul 14 '20 06:07 vsile

I also suffer because of this

xsubject avatar Jul 20 '20 22:07 xsubject

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

xsubject avatar Jul 20 '20 22:07 xsubject

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.

damz avatar Oct 07 '20 15:10 damz