vscode-go icon indicating copy to clipboard operation
vscode-go copied to clipboard

Generate Unit-Tests fails for Generics

Open mwat56 opened this issue 1 year ago • 0 comments

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.

    • go version go1.22.1 linux/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.

    • golang.org/x/tools/gopls v0.16.1
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.

    • 1.92.0
  • Check your installed extensions to get the version of the VS Code Go extension

    • v0.42.0
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

    go: /usr/lib/go-1.22/bin/go: go version go1.22.1 linux/amd64

    gopls: /home/matthias/devel/Go/bin/gopls (version: v0.16.1 built with go: go1.22.1) gotests: /home/matthias/devel/Go/bin/gotests (version: v1.6.0 built with go: go1.22.1) gomodifytags: /home/matthias/devel/Go/bin/gomodifytags (version: v1.16.0 built with go: go1.22.1) impl: not installed goplay: not installed dlv: /home/matthias/devel/Go/bin/dlv (version: v1.22.1 built with go: go1.22.1) staticcheck: /home/matthias/devel/Go/bin/staticcheck (version: v0.4.7 built with go: go1.22.1)

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file. Share all the settings with the go. or ["go"] or gopls prefixes.

Describe the bug

A clear and concise description of what the bug. A clear and concise description of what you expected to happen.

Steps to reproduce the behavior:

When I try to prepare a unit-test for a function or file that uses generics I only get the message:

output.Process: imports.Process: /tmp/gotests_2003483964:75:23: missing type constraint (and 10 more errors)

mwat56 avatar Aug 09 '24 15:08 mwat56