You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on May 7, 2021. It is now read-only.
Is go-plus not suppose to analyze your code if its open on a different pane? #44
Is go-plus not suppose to analyze your code if its open on a different pane?
I had a different file open on a right pane and when I saved, it didn't do syntax analysis or anything like that. Is that expected behaviour?
Also, when I save only with one file, two little windows at the bottom with the same message open, even though there is only one file open. These bugs are happening only after the update to 2.0.1, not sure if I should open a new gitissue...
@brando90 Currently go-plus analyzes the currently active EditorView. This means that if you have multiple files open (e.g. in different panes) that only the one with focus when you save will be analyzed and have warnings / errors displayed. Coverage works across all files in a package.
I can think of a few alternative behaviors that might be helpful:
run go build / go test on the current package instead of just the file in question
run go build ./... / go test ./... on the current package instead of just the file in question
iterate through all panes and find the active EditorView in each, and run go build / go test on the relevant file
try to find the root of the app / library and run go build ./... / go test ./... there << requires some level of magic or configuration, neither of which I like
I would argue for running go test on the current package. If I accidentally change a type/variable/whatever name in one file which is used in another I want to know that immediately. Running it on all packages in the subtree seems a bit wasteful but might be handy as an extra command in the palette.
The issue with running go test on save is that some people write integration tests and then we could have minutes worth of tests running. The coverage feature does run go test -coverprofile on save if you have Coverage On Save turned on, but see #45 for an enhancement request for that.
The syntax check feature does not actually run the tests but simply checks if the file can be compiled. Switching to trying to compile the entire package would not have a huge speed penalty (go's compiler is fast), but would achieve the outcome you're looking for.
That paired with #45 would probably address your requirements?
The syntax check feature does not actually run the tests but simply checks if the file can be compiled.
I didn't even know that this is possible. Maybe we could allign it with the Coverage On Save flag. Since to run the tests you have to compile the whole package anyway, right?
I would have expected the behaviour you described, i.e. that it analyzes the currently active EditorView. However, as far as I can tell, the little window at the bottom for go-plus does not come out when my cursor is on the file I want go-plus to analyze. It might be analyzing it but its not telling me anything about it. I do see at the bottom of the atom window that the correct file is being described (i.e. I am sure I am on the correct file). Do you experience this behaviour or is it just me?
Also, when I save only with one file, two little windows at the bottom with the same message open, even though there is only one file open. These bugs are happening only after the update to 2.0.1, not sure if I should open a new gitissue...
I got the multiple (I had three at one point) message windows. I fixed it by either reinstalling go-plus (uninstall and then install) or by force quitting atom and then restarting it. It seemed to coincide with updating through the gui package interface in atom.
Edit: I managed to reproduce the problem. If you have go-plus installed and have an editor window open with go code with an error it produces one window. If you then uninstall go-plus and reinstall and go back to that editor and save again it produces two windows. This can be repeated and it will keep creating more windows. The workaround is to close atom and reopen it after updating go-plus.
I can confirm I have reproduced the bug where you get two message panels after an update.
The workaround for now is to quit atom and relaunch it after and upgrade or initial install. I need to dig further to determine if this is an issue with atom-message-panel itself or something I'm doing.
I'm going to track the second issue reported here as a separate bug: #49. The original issue reported here (that syntax issues were not identified across an entire package) has been resolved in 2.0.2.
also, related to the window for the go code warning appearing, is there a keyboard way of closing it? Not sure if this should be a new gitissue or something...
Activity
joefitzgerald commentedon Jul 25, 2014
@brando90 Currently go-plus analyzes the currently active EditorView. This means that if you have multiple files open (e.g. in different panes) that only the one with focus when you save will be analyzed and have warnings / errors displayed. Coverage works across all files in a package.
joefitzgerald commentedon Jul 25, 2014
I can think of a few alternative behaviors that might be helpful:
go build/go teston the current package instead of just the file in questiongo build ./.../go test ./...on the current package instead of just the file in questionEditorViewin each, and rungo build/go teston the relevant filego build ./.../go test ./...there << requires some level of magic or configuration, neither of which I likecryptix commentedon Jul 26, 2014
I would argue for running
go teston the current package. If I accidentally change a type/variable/whatever name in one file which is used in another I want to know that immediately. Running it on all packages in the subtree seems a bit wasteful but might be handy as an extra command in the palette.joefitzgerald commentedon Jul 26, 2014
The issue with running go test on save is that some people write integration tests and then we could have minutes worth of tests running. The coverage feature does run
go test -coverprofileon save if you have Coverage On Save turned on, but see #45 for an enhancement request for that.The syntax check feature does not actually run the tests but simply checks if the file can be compiled. Switching to trying to compile the entire package would not have a huge speed penalty (go's compiler is fast), but would achieve the outcome you're looking for.
That paired with #45 would probably address your requirements?
cryptix commentedon Jul 26, 2014
Ok, I see.
I didn't even know that this is possible. Maybe we could allign it with the
Coverage On Saveflag. Since to run the tests you have to compile the whole package anyway, right?brando90 commentedon Jul 26, 2014
Hi @joefitzgerald.
I would have expected the behaviour you described, i.e. that it analyzes the currently active EditorView. However, as far as I can tell, the little window at the bottom for go-plus does not come out when my cursor is on the file I want go-plus to analyze. It might be analyzing it but its not telling me anything about it. I do see at the bottom of the atom window that the correct file is being described (i.e. I am sure I am on the correct file). Do you experience this behaviour or is it just me?
brando90 commentedon Jul 26, 2014
Also, when I save only with one file, two little windows at the bottom with the same message open, even though there is only one file open. These bugs are happening only after the update to 2.0.1, not sure if I should open a new gitissue...
joefitzgerald commentedon Jul 26, 2014
@brando90 sounds like I need some tests for a two-pane workspace! Yes, please create a new issue.
joefitzgerald commentedon Jul 26, 2014
Actually, nevermind I will track both issues in this issue.
Omegaice commentedon Jul 26, 2014
I got the multiple (I had three at one point) message windows. I fixed it by either reinstalling go-plus (uninstall and then install) or by force quitting atom and then restarting it. It seemed to coincide with updating through the gui package interface in atom.
Edit: I managed to reproduce the problem. If you have go-plus installed and have an editor window open with go code with an error it produces one window. If you then uninstall go-plus and reinstall and go back to that editor and save again it produces two windows. This can be repeated and it will keep creating more windows. The workaround is to close atom and reopen it after updating go-plus.
Display Compilation Errors For Entire Package
joefitzgerald commentedon Jul 28, 2014
I can confirm I have reproduced the bug where you get two message panels after an update.
The workaround for now is to quit atom and relaunch it after and upgrade or initial install. I need to dig further to determine if this is an issue with atom-message-panel itself or something I'm doing.
joefitzgerald commentedon Jul 28, 2014
I'm going to track the second issue reported here as a separate bug: #49. The original issue reported here (that syntax issues were not identified across an entire package) has been resolved in
2.0.2.brando90 commentedon Jul 28, 2014
also, related to the window for the go code warning appearing, is there a keyboard way of closing it? Not sure if this should be a new gitissue or something...