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: quickfix_empty_files (govim) test flaky #36795
Comments
Note the test linked above is not yet merged, but can be run locally via:
If you want to use
|
I believe that https://golang.org/cl/216310 will have fixed this issue. |
Change https://golang.org/cl/216637 mentions this issue: |
I spoke too soon, but I was able to reproduce and debug this test. The CL above fixed it for me. |
If an orphaned file is used to recover a workspace package, we should remove the initialization error and treat the view as correctly initialized. Also, stop caching metadata for packages with no files. We have no way to invalidate it, and it's useless, so just re-load those files as needed. Fixes golang/go#36795. Change-Id: I0aee5a43401517b6073d27136cca533160effef2
We're also seeing issues here that look remarkably similar to #36661 (comment). I'll gather log files. |
If an orphaned file is used to recover a workspace package, we should remove the initialization error and treat the view as correctly initialized. Also, stop caching metadata for packages with no files. We have no way to invalidate it, and it's useless, so just re-load those files as needed. Fixes golang/go#36795. Fixes golang/go#36671. Fixes golang/go#36772. Change-Id: I0aee5a43401517b6073d27136cca533160effef2
Just wanted to confirm: In the pass case, the files have the path |
No. The |
@myitcv: Are you seeing this issue again with |
Closing this issue due to lack of activity. Please re-open if this remains a problem. |
Sorry, my bad @stamblerre - totally didn't get round to replying here. All confirmed as good thanks. |
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?
This is somewhat similar to #36661
We have just added a new
govim
test that seeks to verify diagnostics are as expected where initially empty.go
files exist on disk, but changes to populate those files are then made (but not saved) within the editor.Like #36661, the scenario involves creating a package p with a simple function DoIt. p is imported by a main package. p also has a test file that exercises DoIt, and an external test file that does the same.
Initially all call sites for DoIt incorrectly pass an integer argument, meaning we should have error diagnostics for all call sites. Then we correct the definition of DoIt to take an integer argument at which point all diagnostics should disappear.
The test can be seen here:
https://github.com/govim/govim/blob/cmd_govim_add_tests_where_files_initially_empty/cmd/govim/testdata/scenario_default/quickfix_empty_files.txt
What did you expect to see?
The diagnostic error:
for each of the files
main.go
,p/x_test.go
andp/p_test.go
What did you see instead?
Random results
main.go
package p; expected p_test
forp/p.go
"could not import mod.com/p (no parsed files for package mod.com/p, expected: [], errors: [], list errors: [-: p/p.go:1:1: expected 'package', found 'EOF'])
forp/x_test.go
One such
gopls
log file:gopls.log
Tentatively marking as
v0.3.0
cc @stamblerre
FYI @leitzler
The text was updated successfully, but these errors were encountered: