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

Open
stamblerre opened this issue Oct 21, 2020 · 4 comments
Open

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

stamblerre opened this issue Oct 21, 2020 · 4 comments

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 21, 2020

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
@findleyr findleyr self-assigned this Nov 10, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Nov 10, 2020

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

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Nov 10, 2020

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

@findleyr findleyr commented Nov 10, 2020

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

@gopherbot gopherbot commented Dec 10, 2020

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: v1.0.0 Feb 28, 2021
@dmitshur dmitshur removed the Soon label May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants