Skip to content
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/internal/lsp/cache: TestFileMap fail in windows #63363

Closed
qiulaidongfeng opened this issue Oct 4, 2023 · 2 comments
Closed

x/tools/gopls/internal/lsp/cache: TestFileMap fail in windows #63363

qiulaidongfeng opened this issue Oct 4, 2023 · 2 comments
Assignees
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@qiulaidongfeng
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
tip

Does this issue reproduce with the latest release?

yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

git clone https://github.com/golang/tools
cd tools
cd gopls
go test ./...

What did you expect to see?

Test passed.

What did you see instead?

--- FAIL: TestFileMap (0.00s)
--- FAIL: TestFileMap/singleton (0.00s)
filemap_test.go:87: Files mismatch (-want +got):
[]string{
- "/a/b",
+ "E:/a/b",
}
filemap_test.go:104: Dirs mismatch (-want +got):
[]string{
- "/",
+ "E:/",
- "/a",
+ "E:/a",
}
--- FAIL: TestFileMap/overlay (0.00s)
filemap_test.go:87: Files mismatch (-want +got):
[]string{
- "/a/b",
+ "E:/a/b",
}
filemap_test.go:95: Overlays mismatch (-want +got):
[]string{
- "/a/b",
+ "E:/a/b",
}
filemap_test.go:104: Dirs mismatch (-want +got):
[]string{
- "/",
+ "E:/",
- "/a",
+ "E:/a",
}
--- FAIL: TestFileMap/replace_overlay (0.00s)
filemap_test.go:87: Files mismatch (-want +got):
[]string{
- "/a/b",
+ "E:/a/b",
}
filemap_test.go:104: Dirs mismatch (-want +got):
[]string{
- "/",
+ "E:/",
- "/a",
+ "E:/a",
}
--- FAIL: TestFileMap/multi_dir (0.00s)
filemap_test.go:87: Files mismatch (-want +got):
[]string{
- "/a/b",
+ "E:/a/b",
- "/c/d",
+ "E:/c/d",
}
filemap_test.go:104: Dirs mismatch (-want +got):
[]string{
- "/",
+ "E:/",
- "/a",
+ "E:/a",
- "/c",
+ "E:/c",
}
--- FAIL: TestFileMap/empty_dir (0.00s)
filemap_test.go:87: Files mismatch (-want +got):
[]string{
- "/c/d",
+ "E:/c/d",
}
filemap_test.go:104: Dirs mismatch (-want +got):
[]string{
- "/",
+ "E:/",
- "/c",
+ "E:/c",
}
FAIL
exit status 1
FAIL golang.org/x/tools/gopls/internal/lsp/cache 0.232s

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Oct 4, 2023
@gopherbot gopherbot added this to the Unreleased milestone Oct 4, 2023
@hyangah hyangah modified the milestones: Unreleased, gopls/v0.14.0 Oct 4, 2023
@hyangah
Copy link
Contributor

hyangah commented Oct 4, 2023

@findleyr Looks like the normalize uses a hard-coded "C:" drive name, which can be problematic for some users.

@gopherbot
Copy link

Change https://go.dev/cl/534138 mentions this issue: gopls: allow all drive letters in cache/filemap_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants