Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

gotype-live is reporting errors based off out-of-date file content #943

Closed
Taik opened this issue Apr 25, 2017 · 10 comments
Closed

gotype-live is reporting errors based off out-of-date file content #943

Taik opened this issue Apr 25, 2017 · 10 comments

Comments

@Taik
Copy link

Taik commented Apr 25, 2017

When using live error reporting, gotype-live sometimes returns errors based off out-of-date file content. It's very noticeable when switching between branches where an extra parameter was added to function/method signatures (in my case, I'm extending functions to take in context.Context).

My current setup:

VSCode: Version 1.11.2 (1.11.2)
vscode-go: Version 0.6.59 
vim: 0.6.18

Live error config:

"go.liveErrors": { "enabled": true, "delay": 500 }
@ramya-rao-a
Copy link
Contributor

That's weird. Live errors should really act on the live file :)

One thing to note is that live error reporting kicks in when you start making changes to the file.
Are you seeing this when you switch branches, but haven't edited the file yet?

cc @tylerb

@Taik
Copy link
Author

Taik commented Apr 26, 2017

I agree :)

Closing and opening the file does not display the errors right away, until I start typing.
The errors are not really related to the line at all, and for the most part points to another part of the code completely (another file). Here's an example:

screen shot 2017-04-25 at 9 37 44 pm

I opened the file and created a new line (L280), and the error started showing up.

@tylerstillwater
Copy link
Contributor

tylerstillwater commented Apr 26, 2017 via email

@ramya-rao-a
Copy link
Contributor

The next release would be early next week which will have the fix for the issue of errors from other files showing up in the current file.

@Taik if you don't mind can you side load the Go extension from master (See https://github.com/Microsoft/vscode-go/wiki/Building,-Debugging-and-Sideloading-the-extension-in-Visual-Studio-Code#sideloading-the-extension) to confirm that the fix in master fixes your issue?

@Taik
Copy link
Author

Taik commented Apr 27, 2017

I just gave it a try, and it seems like it fixed it. Thanks for the awesome plugin!

@ramya-rao-a
Copy link
Contributor

Thanks @Taik
The credit for the live-error feature goes to @tylerb :)

@ramya-rao-a
Copy link
Contributor

Fix is out in the latest update (0.6.60)

@ramya-rao-a ramya-rao-a added the bug label May 4, 2017
@tylerstillwater
Copy link
Contributor

Thanks much, @ramya-rao-a!!

@wangxufire
Copy link

I also have the problem in 0.6.62.

@ramya-rao-a
Copy link
Contributor

@wangxufire Please share a video/gif of the problem you are seeing. Preferably using a small simple code

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants