-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: x/tools/gopls: support for per-.go file builds #33595
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
Comments
I don't understand what is being proposed here. Is this issue still relevant? |
As I understand things (although @stamblerre and @ianthehat might be able to correct my understanding/bring it up to date) |
Yes, there is a gap, gopls expects that it is working with a rooted project where running |
#34160 is probably a good starting point for this, right? |
@stamblerre, @myitcv, what's the status of this? |
Can we at least do this for |
@stamblerre will defer to you on whether we keep this open or flip over to #34160 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
It's a fairly common (citation required) workflow for people to have a single
.go
file that defines amain()
function and thengo run X.go
As things stand,
go/packages
is oriented around packages (somewhat by definition because of its name)This issue (and apologies if there is a pre-existing one that covers the same topic, my search turned up blank) is to discuss whether it's worth adding support within
gopls
for per.go
file "builds".There is some discussion with @eliasnaur on this topic in govim/govim#437
The UI/UX around this is not discussed, but the idea is that a single file is effectively treated as the entire package/"build".
There has been some related discussion about this in previous golang-tools calls in the context of
// +build ignore
-ed code generators that live in the same directory as the target of the code generation.cc @stamblerre @ianthehat
The text was updated successfully, but these errors were encountered: