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: handle line directives #34433

Open
renthraysk opened this issue Sep 20, 2019 · 2 comments

Comments

@renthraysk
Copy link

commented Sep 20, 2019

What version of Go are you using (go version)?

go version go1.13 linux/amd64

And gopls...
golang.org/x/tools/gopls v0.1.7
golang.org/x/tools/gopls@v0.1.7 h1:YwKf8t9h69++qCtVmc2q6fVuetFXmmu9LKoPMYLZid4=

Does this issue reproduce with the latest release?

Yes

What did you do?

Open https://play.golang.org/p/-QfVqDKxsFI in VSCode.

What did you expect to see?

No crashing.

What did you see instead?

"The gopls server crashed 5 times in the last 3 minutes. The server will not be restarted."

@gopherbot gopherbot added this to the Unreleased milestone Sep 20, 2019
@stamblerre stamblerre changed the title x/tools/gopls: crashes with goyacc generated code x/tools/gopls: crashes with line directives Sep 20, 2019
@golang golang deleted a comment from gopherbot Sep 20, 2019
@stamblerre

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2019

Thanks for reporting this. Looks like we aren't correctly handling code with line directives. This will require some work, but we can at least prevent the crash from occurring.

@gopherbot

This comment has been minimized.

Copy link

commented Sep 20, 2019

Change https://golang.org/cl/196662 mentions this issue: internal/span: handle invalid column values to avoid crashing

gopherbot pushed a commit to golang/tools that referenced this issue Sep 23, 2019
This might not be necessary after we fix handling for line directives,
but it's always better to avoid the panic here.

Updates golang/go#34433

Change-Id: Ica4fb571dff6753fb15bf8d397c55f713284aa27
Reviewed-on: https://go-review.googlesource.com/c/tools/+/196662
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
clintjedwards added a commit to clintjedwards/tools that referenced this issue Sep 25, 2019
This might not be necessary after we fix handling for line directives,
but it's always better to avoid the panic here.

Updates golang/go#34433

Change-Id: Ica4fb571dff6753fb15bf8d397c55f713284aa27
Reviewed-on: https://go-review.googlesource.com/c/tools/+/196662
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
@stamblerre stamblerre changed the title x/tools/gopls: crashes with line directives x/tools/gopls: handle line directives Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.