Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: migrate "test generation" features to gopls #47479

Open
n1lesh opened this issue Jul 30, 2021 · 1 comment
Open

x/tools/gopls: migrate "test generation" features to gopls #47479

n1lesh opened this issue Jul 30, 2021 · 1 comment
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@n1lesh
Copy link

n1lesh commented Jul 30, 2021

vscode-go uses the gotests package to generate unit tests, which makes it hard to adjust the test generation behavior as mentioned here: vscode-go issue #1594.

We could move the test generation logic to gopls, which provides a few benefits,

  1. Flexibility in modifying logic around test generation. Current vscode-go implementation uses gotests as a child process to generate tests, which makes it hard to customize test generation.
  2. Reduction in the number of 3rd party tools for vscode-go. gotests package moves within gopls.

More about it here.

/cc @stamblerre

@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jul 30, 2021
@seankhliao seankhliao changed the title gopls: Migrate "test generation" features to gopls x/tools/gopls: Migrate "test generation" features to gopls Jul 31, 2021
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Jul 31, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jul 31, 2021
@seankhliao seankhliao added FeatureRequest Tools This label describes issues relating to any tools in the x/tools repository. and removed Tools This label describes issues relating to any tools in the x/tools repository. labels Jul 31, 2021
@beoran
Copy link

beoran commented Jul 31, 2021

Currently, gotests is written to work as as a command only. I reccommend you would work together with @cweil and help to develop a version of gotests that also can be used as a module library, and which has the additional features you would like. This will then also benefit people who are not using gopls or VisualStudio, and want to integrate this in a different editor, like myself.

@findleyr findleyr modified the milestones: Unreleased, gopls/unplanned Aug 3, 2021
@stamblerre stamblerre changed the title x/tools/gopls: Migrate "test generation" features to gopls x/tools/gopls: migrate "test generation" features to gopls Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants