-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: (initial) diagnostics inconsistently sent/resent for go/analysis results #36340
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Comments
myitcv
added a commit
to myitcvforks/govim
that referenced
this issue
Jan 1, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these
myitcv
added a commit
to myitcvforks/govim
that referenced
this issue
Jan 1, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these
Thanks for the report. These do sound like bugs, so I'll investigate now. |
Change https://golang.org/cl/213122 mentions this issue: |
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 4, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 5, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 5, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 5, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 5, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 5, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 6, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 6, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 6, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 6, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 6, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 6, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 7, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 7, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 7, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 7, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 8, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 8, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 8, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 8, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
myitcv
added a commit
to govim/govim
that referenced
this issue
Jan 8, 2020
This uber PR contains a number of changes to our testscript tests: * Drop all errlogmatch's looking for assertions where we really should not need them. Historically we needed these because the threading model of gopls was a bit broken. i.e. despite us notifying of a change to a file, unless we waited for diagnostics to be available then we couldn't guarantee that, for example, completions would be correct * Fix up all go.mod files to include go directives so that we don't fall foul of golang/go#36144 * Where we do require errlogmatch's, make sure we follow the existing semantics per golang/go#36243 and golang/go#36340 * Fix up some scripts so that we don't have initial errors in the file and hence don't need to soak up initial diagnostics * Use sleep $DEFAULT_ERRLOGMATCH_WAIT where we expect there to be no diagnostic errors * Only use errlogmatch on diagnostic publications where we need to know that a file has been opened, e.g. file watching, or where we need to soak up initial diagnostic notifications (see golang/go#36243) * Move all commented-out errlogmatch commands matching on the number of errors to the end of each script. We still can't enable these Add some initial tests that help to verify our expectations around diagnostics being published by gopls. Set GOPATH and GOCACHE consistently for the install testscript scripts to speed them up. Call t.Parallel in a couple of places to speed up the entire test run. Add a test (that is skipped) which capture the essence of golang/go#36144.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
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?
As a follow up to #36243, we are seeing some strange behaviour when it comes to diagnostics being published by
gopls
which is making it hard to assert ingovim
integration tests.Consider the following setup:
Open your editor in the context of the
mod.com
module, but do not open any file.Observe that there are no initial diagnostics sent (see #36243 (comment))
Now open
main.go
and you will see that diagnostics are sent for bothmain.go
(at version 1) andother.go
(at version 0).Now open
other.go
and you will see that diagnostics are sent for bothother.go
(at version 1) andmain.go
(at version 1). Themain.go
diagnostics are unchanged.Now add a blank line as the final line in the
main
function inmain.go
and you will see that diagnostics are sent forother.go
(at version 1), despite them not being changed from before.Now add a blank line as the final line in the
foo
function inother.go
and you will see that diagnostics are sent formain.go
(at version 2), despite them not being changed from before.What did you expect to see?
What did you see instead?
Per above
cc @stamblerre @findleyr
The text was updated successfully, but these errors were encountered: