-
Notifications
You must be signed in to change notification settings - Fork 819
Using Go Companion #3652
-
I followed some advice to add the Go companion, but AFAIk it didn't specify using a pre-release version of the Go extension?
The documentation should specify that. If it doesn't, please open an issue or point me at it and I'll fix it. I did post that advice on various issues but I forgot to mention that it's intended to be used with a prerelease version of the Go extension. However, currently Go Companion will activate and do it's job regardless of what version of the Go extension you're using. #3651 will change that, but I created that just today. At the moment I'd expect you to see duplicates of features like the tests in the test explorer and code lenses.
This was all working correctly a few weeks ago.
I don't suppose you know what version of each extension you were using?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 6 replies
-
@firelizzard18 the extension docs/readme don't have any mention of a requirement on the pre-release Go extension and the settings link is currently broken.
I will have been using the latest non pre-release version of both at about December the 12th.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @firelizzard18 I actually installed the companion and never got it to do what I wanted with the test explorer. Firstly it was because gopls
wasn't at the right version and then when that was fixed I wasn't sure why it wasn't working. Requiring a pre-release version of the Go extension makes sense.
Beta Was this translation helpful? Give feedback.
All reactions
-
The companion should still work as long as gopls is up to date. Currently the version dependency is one way and all it does is disable the older test explorer implementation. Release versions of the Go extension simply ignore the companion but at the moment the companion's behavior is completely independent of the Go extension.
If you explicitly disable the older implementation by setting "go.testExplorer.enable": false
then it doesn't matter which version of the Go extension you have. If you do that, you should still see test items as provided by the companion. If you don't that's likely a bug in the companion or gopls.
Beta Was this translation helpful? Give feedback.
All reactions
-
If you explicitly disable the older implementation by setting "go.testExplorer.enable": false then it doesn't matter which version of the Go extension you have. If you do that, you should still see test items as provided by the companion. If you don't that's likely a bug in the companion or gopls.
If I do this the whole of VS Code hangs waiting for pre-save actions if I modify a Go file. The test explorer is also un-populated and refers to Python.
Beta Was this translation helpful? Give feedback.
All reactions
-
That is concerning, it sounds like Go Companion is failing to report any tests. I'd guess Go Companion is querying gopls and that query is hanging and blocking everything else. Would you open an issue and attach logs?
Beta Was this translation helpful? Give feedback.
All reactions
-
Sorry I don't have the logs as I deactivated the companion.
Beta Was this translation helpful? Give feedback.