Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Using Go Companion #3652

Unanswered
firelizzard18 asked this question in Help
Jan 6, 2025 · 1 comments · 6 replies
Discussion options

@stevehipwell:

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?

You must be logged in to vote

Replies: 1 comment 6 replies

Comment options

@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.

You must be logged in to vote
6 replies
Comment options

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.

Comment options

firelizzard18 Jan 6, 2025
Collaborator Author

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.

Comment options

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.

Comment options

firelizzard18 Jan 7, 2025
Collaborator Author

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?

Comment options

Sorry I don't have the logs as I deactivated the companion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /