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

Comments

@stamblerre
Copy link
Contributor

@stamblerre 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
Copy link
Contributor Author

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

@heschi
Copy link
Contributor

@heschi heschi commented Oct 5, 2020

No, I don't.

@hyangah
Copy link
Contributor

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

@stamblerre stamblerre commented Oct 5, 2020

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.

@stamblerre stamblerre closed this Oct 5, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants