mirror of https://github.com/golang/go.git
When a go.work file fails to validate, the workspace is left in an invalid state: we will detect that the workspace is defined by the go.work, but will not actually parse any active modules. This should be a critical error. Fix this by adding allowing the workspace to surface critical errors via a new cache.workspace.criticalError method. Additionally: - only build the workspace mod file in workspace.build if the mode is fileSystemWorkspace (in all other modes the modfile is already determined) - rename workspace.invalidate to workspace.Clone, to be consistent with other data structures - rename CriticalError.DiagList to CriticalError.Diagnostics - add several TODOs for observations while reading the code - create a new file for regtests related to broken workspaces - make the regtest sandbox panic when duplicate paths are present in the sandbox file set (an error I made while writing the test) Updates golang/go#53933 Change-Id: If8625ab190129bc9c57e784314bc9cc92644c955 Reviewed-on: https://go-review.googlesource.com/c/tools/+/417593 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Robert Findley <rfindley@google.com> |
||
|---|---|---|
| .. | ||
| completion | ||
| add_import.go | ||
| api_json.go | ||
| call_hierarchy.go | ||
| code_lens.go | ||
| comment.go | ||
| comment_test.go | ||
| diagnostics.go | ||
| extract.go | ||
| fix.go | ||
| folding_range.go | ||
| format.go | ||
| format_test.go | ||
| gc_annotations.go | ||
| highlight.go | ||
| hover.go | ||
| identifier.go | ||
| identifier_test.go | ||
| implementation.go | ||
| inlay_hint.go | ||
| known_packages.go | ||
| options.go | ||
| options_test.go | ||
| references.go | ||
| rename.go | ||
| rename_check.go | ||
| signature_help.go | ||
| source_test.go | ||
| stub.go | ||
| symbols.go | ||
| types_format.go | ||
| util.go | ||
| util_test.go | ||
| view.go | ||
| workspace_symbol.go | ||
| workspace_symbol_test.go | ||