Closed chezearth closed 5 years ago
Hi there! Happy to help figure out what's going on.
What does the sample Go file that you're trying to compile look like? And what's the location of the file on disk? Is it in your $GOPATH
?
I wouldn't expect other Atom packages to affect the paths that go-plus uses. Note though that syntax highlighting for Go is provided by language-go
, which is bundled with Atom. You shouldn't have to install anything extra to get syntax highlighting.
Thanks for the help. My sample Go file:
package main
import "fmt"
func main() {
fmt.Println(greet("Jane", "Doe"))
}
func greet(fname, lname string) (string, string) {
return fmt.Sprint(fname, lname), fmt.Sprint(lname, fname)
}
Really simple.
Yes, the file is in a subdirectory of my $GOPATH
. language-go
is installed but there is no highlighting (which I presume means syntax errors are highlighted, usually by red underlining?).
Nothing stands out as obviously wrong so far.
which go
?Dear Zac,
The issues page won’t allow me to send any more comments. Anyway, here is my file’s path, my $GOPATH
variable and the response to $ which go
.
file at /Users/Charles/Code/go-workspace/src/github.com/chezearth/udemyGolangTraining/14_functions/07_variadic-params/main.go
$ echo $GOPATH
/Users/Charles/Code/go-workspace
$ which go
/usr/local/go/bin/go
On 17 Jul 2018, at 23:25, Zac Bergquist notifications@github.com wrote:
Hi there! Happy to help figure out what's going on.
What does the sample Go file that you're trying to compile look like? And what's the location of the file on disk? Is it in your $GOPATH?
I wouldn't expect other Atom packages to affect the paths that go-plus uses. Note though that syntax highlighting for Go is provided by language-go, which is bundled with Atom. You shouldn't have to install anything extra to get syntax highlighting.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joefitzgerald/go-plus/issues/792#issuecomment-405733303, or mute the thread https://github.com/notifications/unsubscribe-auth/AFB01WaRNatRl6h5M2NzL4OYUEoYb6_fks5uHlZhgaJpZM4VThjQ.
I installed from the GoLang website (not from HomeBrew). Upgraded from 1.5 to 1.10 after the problem started.
On 17 Jul 2018, at 23:41, Zac Bergquist notifications@github.com wrote:
Nothing stands out as obviously wrong so far.
What's the exact path of the Go file? What is the output of which go? How did you install Go? Could it be that you have more than one version installed? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joefitzgerald/go-plus/issues/792#issuecomment-405737489, or mute the thread https://github.com/notifications/unsubscribe-auth/AFB01a2fJTU9gMkZECN5lyeT9tkV5J9Tks5uHloWgaJpZM4VThjQ.
Thanks for the details. Everything seems ok so far. Have you tried launching Atom from a terminal inside the project directory?
Users/Charles/Code/go-workspace/src/github.com/chezearth/udemyGolangTraining/14_functions/07_variadic-params/$ atom .
It might help to try to clear out your $GOPATH/pkg
directory in case any old Go 1.5 libraries are still sitting in there.
Does this happen on any Go code you try to write, or just this particular project?
That's all the ideas I have for now. If you're up for it, we may be able to do a screen share to take a closer look at what's going on.
Tried launching Atom from the a terminal inside the directory. Same result.
Cleared out the pkg/
directory ... same result afterwards.
It happens on all my go files.
I'm ok to try a screen share. Tomorrow? My time is 00:19 GMT +2. Now it's really late my side.
Ok, I seem to have got somewhere. I downgraded my version to 5.6.0 using apm install go-plus@5.6.0
and yes, it's fixed! Atom then asked me to upgrade, of course, which I did, and hey, presto, the issue's back. Seems to be a version thing.
I'll try and figure out which is latest working version.
Just to add to my last comment: versions up to 5.7.2 work fine. From 5.8.1 onwards, the issue is there.
Going to close this as there hasn't been any activity in a while. Feel free to open a new issue if you need more help.
Dear Zac,
Thank you for this information.
I did experience a problem with a previous version of go-plus (it was current in June-July 2018) and I had to downgrade to an even older version to avoid it. However, I have now upgraded again to the latest versions (current in December 2018) and go-plus is working beautifully. So yes, happy you closed.
Charles Rethman
19 Sans Souci Road, Newlands, 7700 rethman@telkomsa.net rethman@me.com skype: cwrethman mobile: +27 71 6735502 home: +27 21 6861510
On 21 Jan 2019, at 18:44, Zac Bergquist notifications@github.com wrote:
Closed #792 https://github.com/joefitzgerald/go-plus/issues/792.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joefitzgerald/go-plus/issues/792#event-2086879215, or mute the thread https://github.com/notifications/unsubscribe-auth/AFB01TrOnWgaezLO4hoS3a9LHISlmi6sks5vFe5egaJpZM4VThjQ.
Prerequisites
atom .
from the terminal in your project's directory? YESgo env
is correct? If it is, please include the output in this issue. YESDescription
Saving a .go file with go-plus installed causes the following error in the output when it tries to compile:
Doing an
ls
on the two paths in the error text above gives:the first directory has no go files, only directories ; and the second does not exist. How are these two directories set in go-plus?
Output from
atom -v && apm -v
Output From
go env
also
My
$GOPATH
, i.e.,/Users/Charles/Code/go-workspace
has the usualbin
, 'pkg
andsrc
directories in it.Steps to Reproduce
Make a small Go file in the editor and save it (ctrl-s) to get go-plus to build (install). In the terminal, using go build . or go install . in the file's directory causes no problems.
I was previously trying to install a syntax highlighter that works (go-plus doesn't seem to do this) and I tried a few other packages when this problem started. I have since deinstalled all packages from Atom associated with GoLang or any other language, leaving only a few decorative packages such as file-icons. May this have somehow affected the package's paths (my
$GOPATH
,$GOROOT
haven't changed)?Expected Behavior
The file should be compiled.
Actual Behavior
This error is produced in the Output pane of go-plus: