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

cmd/go: support overlays in the go command #39958

Open
stamblerre opened this issue Jun 30, 2020 · 2 comments
Open

cmd/go: support overlays in the go command #39958

stamblerre opened this issue Jun 30, 2020 · 2 comments

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jun 30, 2020

This has been discussed fairly often, but I figured it was worth filing an issue for tracking purposes.

Many tools, gopls in particular, work on unsaved files. As a result, tools like go/packages support overlays, which can replace file contents or represent entirely new files. The overlay logic for go list in go/packages is complex and error-prone, as it effectively needs to recreate the behavior of go list. It is a constant source of gopls bugs, many of which (#39646 for a recent example) manifest in seemingly unrelated ways. Supporting overlays natively in the go command would eliminate all of this complicated logic and this source of errors.

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jul 1, 2020

@matloob
Copy link
Contributor

@matloob matloob commented Jul 1, 2020

I'd really like for this to happen. We'll have to find out not only how to propagate the overlaid file contents through cmd/go, but also to the compiler...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.