mirror of https://github.com/golang/go.git
internal/lsp/cache: clarify an error message about mismatching casing
Fixes golang/go#47509 Change-Id: I7a72470b7281277ece301cda4486aed83baaa08d Reviewed-on: https://go-review.googlesource.com/c/tools/+/339352 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
594b3a2b64
commit
7a2ec0970c
|
|
@ -52,7 +52,7 @@ func darwinCheckPathCase(path string) error {
|
|||
break
|
||||
}
|
||||
if g != w {
|
||||
return fmt.Errorf("case mismatch in path %q: component %q should be %q", path, g, w)
|
||||
return fmt.Errorf("case mismatch in path %q: component %q is listed by macOS as %q", path, g, w)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func windowsCheckPathCase(path string) error {
|
|||
}
|
||||
for got, want := path, longstr; !isRoot(got) && !isRoot(want); got, want = filepath.Dir(got), filepath.Dir(want) {
|
||||
if g, w := filepath.Base(got), filepath.Base(want); g != w {
|
||||
return fmt.Errorf("case mismatch in path %q: component %q should be %q", path, g, w)
|
||||
return fmt.Errorf("case mismatch in path %q: component %q is listed by Windows as %q", path, g, w)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -727,7 +727,7 @@ func (v *View) updateWorkspaceLocked(ctx context.Context) error {
|
|||
|
||||
func (s *Session) getWorkspaceInformation(ctx context.Context, folder span.URI, options *source.Options) (*workspaceInformation, error) {
|
||||
if err := checkPathCase(folder.Filename()); err != nil {
|
||||
return nil, errors.Errorf("invalid workspace configuration: %w", err)
|
||||
return nil, errors.Errorf("invalid workspace folder path: %w; check that the casing of the configured workspace folder path agrees with the casing reported by the operating system", err)
|
||||
}
|
||||
var err error
|
||||
inv := gocommand.Invocation{
|
||||
|
|
|
|||
Loading…
Reference in New Issue