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: error when using vendoring with 1.14 #37629
Comments
Thanks for reporting! Can you share the full output of |
I'm not able to reproduce it reliably - I'm not quite sure what triggers it, but I will try to get a trace. |
Based on the @bcmills: How should go/packages work around this - should we set the |
@stamblerre, as far as I can tell that use in So I would recommend raising the abstraction level up a bit:
|
Ah, wait, that doesn't work because |
Thinking about this some more: is there a use-case for overlays outside of the main module? The module cache is generally read-only anyway, so folks shouldn't be adding files there. I guess you might want to handle overlays for modules substituted in via So that leaves:
|
I'm trying to understand what's going on here. Some questions: @bcmills, you're asking if there's a use-case for overlays outside the main module because you're trying to figure out if we can get rid of the My second question is why doesn't |
Yep.
Correct, with the exception of subdirectories of the main module's
It will not, but it should be ok in general to run |
In contrast, at least up through Go 1.14, That means that the output of |
Thanks for the explanation. I'll start by implementing #2. If we need support for directories in the vendor tree or those that are replaced, we can implement #1 and #3 if requested by users. (My intention is to keep the implementation of overlays as simple and restricted as possible. |
Is there any temporary workaround for this issue? |
@karuppiah7890: I'm sorry, but there's no workaround yet. @matloob should have a fix out soon, however. |
Change https://golang.org/cl/227117 mentions this issue: |
golang.org/cl/227717 should fix it! |
… is used. Go issue: golang/go#37629
This change implements the approach described in golang/go#37629 (comment). This feature is necessary for multi-module workspace support in gopls. Updates golang/go#32394 Change-Id: Iab328020a2681f8651405922cc25d9d06cb1ac82 Reviewed-on: https://go-review.googlesource.com/c/tools/+/254368 Trust: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Rebecca Stambler <rstambler@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org>
What did you do?
I was using
gopls
as usual with VS Code.My environment uses vendoring (implicitly) with the new 1.14 automatic vendor detection.
What did you expect to see?
No errors.
What did you see instead?
An error pop up:
It seems some command used by
gopls
is causing issues when-mod=vendor
is set implicitly by the go tool.Build info
Go info
The text was updated successfully, but these errors were encountered: