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: support a workspace root that is a parent of GOPATH #38078

Closed
stamblerre opened this issue Mar 25, 2020 · 4 comments
Closed

x/tools/gopls: support a workspace root that is a parent of GOPATH #38078

stamblerre opened this issue Mar 25, 2020 · 4 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@stamblerre
Copy link
Contributor

stamblerre commented Mar 25, 2020

See discussion in microsoft/vscode-go#3124 (comment). It should be fairly trivial to implement this, but it may require modifying the root directory of the view, which is why it's filed under this milestone.

/a/
| - go/     <-- GOPATH
     |- src/
         | - b/...
         | - c/...
@stamblerre stamblerre added this to the gopls/v0.5.0 milestone Mar 25, 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 Mar 25, 2020
@stamblerre stamblerre modified the milestones: gopls/v0.5.0, gopls/v0.6.0 Apr 2, 2020
@stamblerre stamblerre modified the milestones: gopls/v0.6.0, gopls/v0.5.0 Jun 26, 2020
@stamblerre stamblerre modified the milestones: gopls/v0.5.0, gopls/v1.0.0 Jul 22, 2020
@stamblerre stamblerre added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 25, 2020
@stamblerre
Copy link
Contributor Author

stamblerre commented Oct 1, 2020

@heschik, @findleyr, @hyangah: Do you think it's worth supporting something like this? It would mean setting the view's root URI to the $GOPATH/src directory instead of the top-level directory. My main concern is--what do we do if the user creates a module under a? Seems like it would be too confusing to manage and possibly not worth it.

@stamblerre stamblerre added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Oct 1, 2020
@heschi
Copy link
Contributor

heschi commented Oct 5, 2020

No, I don't.

@hyangah
Copy link
Contributor

hyangah commented Oct 5, 2020

That kind of directory structure and trick was evolved as a workaround for the pre-modules era.
Given that Go is moving away from GOPATH based source management, I think it's better for those users and us to think about how to migrate the code base to modules mode and figure out what prevents getting rid of the GOPATH hack.

@stamblerre
Copy link
Contributor Author

I agree. With Go 1.16, this should be less of an issue. Also, I think it's reasonable to ask users to open $GOPATH/src as a workspace folder if they absolutely need to.

I will close this issue then.

vscode-go: gopls by default automation moved this from Critical to Done Oct 5, 2020
@stamblerre stamblerre modified the milestones: gopls/v1.0.0, gopls/v0.5.2 Oct 5, 2020
@golang golang locked and limited conversation to collaborators Oct 5, 2021
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. NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. 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