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: add regtests for multiple workspace folders #42111

Closed
stamblerre opened this issue Oct 21, 2020 · 6 comments
Closed

x/tools/gopls: add regtests for multiple workspace folders #42111

stamblerre opened this issue Oct 21, 2020 · 6 comments
Assignees
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@stamblerre
Copy link
Contributor

We currently have no test coverage for multiple workspace folders (not using experimentalWorkspaceModule). We can add a new mode to the regression tests to cover this case.

@stamblerre stamblerre added this to the gopls/vscode-go milestone Oct 21, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Oct 21, 2020
@stamblerre stamblerre added the Soon This needs to be done soon. (regressions, serious bugs, outages) label Oct 29, 2020
@findleyr findleyr self-assigned this Nov 10, 2020
@gopherbot
Copy link

Change https://golang.org/cl/257138 mentions this issue: gopls/internal/regtest: add an option to nest the workdir

@stamblerre
Copy link
Contributor Author

Reopening because this isn't just for nested modules--we need to add tests for multiple workspace folders, each containing a module.

@stamblerre stamblerre reopened this Nov 10, 2020
@stamblerre stamblerre changed the title x/tools/gopls: add a regtest mode for multiple workspace folders x/tools/gopls: add regtests for multiple workspace folders Nov 10, 2020
@findleyr
Copy link
Contributor

Ah, wrong issue. My bad!

@stamblerre stamblerre added this to Needs Triage in vscode-go: gopls by default Nov 10, 2020
@stamblerre stamblerre moved this from Needs Triage to Critical in vscode-go: gopls by default Nov 10, 2020
@stamblerre stamblerre added the Testing An issue that has been verified to require only test changes, not just a test failure. label Nov 10, 2020
@stamblerre stamblerre moved this from Critical to In progress in vscode-go: gopls by default Nov 10, 2020
@stamblerre stamblerre moved this from In progress to Testing in vscode-go: gopls by default Nov 18, 2020
@gopherbot
Copy link

Change https://golang.org/cl/276975 mentions this issue: gopls/internal/regtest: support multiple workspace folders

gopherbot pushed a commit to golang/tools that referenced this issue Jan 5, 2021
This change both simplifies the options used to configure workspace
folders in regtests, and allows for configuring multiple workspace
folders. The WithoutWorkspaceFolders, RootPath, and NestWorkdir options
are all replaced by a single WorkspaceFolders option.

NestWorkdir was always a bit too magical, modifying the execution
directory within the runner itself. Instead, just explicitly move files
down into a nested directory.

runModfileTests was also a bit too much of a special case. Eliminate it
by adding functionality to run multiple times with different options.
Upon the way I started using literals to configure runs, and I think
this is cleaner. Let me know what you think about runMultiple, etc.
This overlaps with the execution modes, which could probably be
eliminated in a later CL.

For golang/go#42111

Change-Id: I56915d8930bc47561cc827b918621cff4b994226
Reviewed-on: https://go-review.googlesource.com/c/tools/+/276975
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Robert Findley <rfindley@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
gopherbot pushed a commit to golang/tools that referenced this issue Jan 11, 2021
This change both simplifies the options used to configure workspace
folders in regtests, and allows for configuring multiple workspace
folders. The WithoutWorkspaceFolders, RootPath, and NestWorkdir options
are all replaced by a single WorkspaceFolders option.

NestWorkdir was always a bit too magical, modifying the execution
directory within the runner itself. Instead, just explicitly move files
down into a nested directory.

runModfileTests was also a bit too much of a special case. Eliminate it
by adding functionality to run multiple times with different options.
Upon the way I started using literals to configure runs, and I think
this is cleaner. Let me know what you think about runMultiple, etc.
This overlaps with the execution modes, which could probably be
eliminated in a later CL.

For golang/go#42111

Change-Id: I56915d8930bc47561cc827b918621cff4b994226
Reviewed-on: https://go-review.googlesource.com/c/tools/+/276975
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Robert Findley <rfindley@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@stamblerre stamblerre removed this from Testing in vscode-go: gopls by default Jan 20, 2021
@stamblerre stamblerre added this to To Do in gopls on-deck Feb 28, 2021
@dmitshur dmitshur removed the Soon This needs to be done soon. (regressions, serious bugs, outages) label May 19, 2021
@findleyr
Copy link
Contributor

I don't think this is a high priority anymore, since workspaces are now our recommended way to work on multiple modules simultaneously.

@findleyr
Copy link
Contributor

findleyr commented Aug 9, 2022

We've got several tests, and can add more if and when we have specific things to test for multiple folders. Closing as obsolete.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2022
@golang golang locked and limited conversation to collaborators Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
No open projects
Development

No branches or pull requests

4 participants