Robert Findley

Results 271 comments of Robert Findley

Err, I just tested this in VS Code and it is broken: The inserted text I get is this: ``` func TestXxx(t *testing.T) { }(t *testing.T) { } ``` Reassigning...

Correction: it works as expected if typing `func Te_`, but if typing `func Te_(t *testing.T) {}` (i.e. modifying the test func name), the completion duplicates the test body. I'm not...

> I see the same problem in my editor before and after the patch. Yep, I think I only noticed it as I was re-testing the feature. May have existed...

Hi @dppascual, thank you for the report. I think I know what this is. The unimported completion cache is built asynchronously in the background. If you added the v1 package...

~I suspect that the difference is the unified export data format. CC @mdempsky~ Sorry, I only skimmed this issue, and didn't see Tim's comment about go list.

> A utility analyzer is overkill; we should just get the API right. The client needs to know "is this file a test file?" or, more often, "is this node...

> But I feel like we do not need to resolve this now in order to know which files are tests. Agreed. I prefer not resolving this now, by treating...

Ok, it sounds like we're honing in on: For go/packages: ```go package packages type Package { // TestFiles lists files that are only used for test code, e.g. because they...

Thanks! I imagine this is straightforward to fix. High level notes: - Add a new kindInterface here: https://cs.opensource.google/go/x/tools/+/master:gopls/internal/golang/completion/printf.go;l=155;drc=6823da4bc3f39c895ac7f0a46d3994d146397193 - Update `completion.candKind` to recognize interfaces - Write tests, e.g. at https://cs.opensource.google/go/x/tools/+/master:gopls/internal/test/marker/testdata/completion/type_mods.txt...

Thanks @naeemaei! Let us know if you need any additional guidance.