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

Generate Unit-Tests fails for Generics #3484

Closed
mwat56 opened this issue Aug 9, 2024 · 1 comment
Closed

Generate Unit-Tests fails for Generics #3484

mwat56 opened this issue Aug 9, 2024 · 1 comment
Labels
Duplicate Make it obvious when issues are closed as duplicate upstream-tools Issues that are caused by problems in the tools that the extension depends on.
Milestone

Comments

@mwat56
Copy link

mwat56 commented Aug 9, 2024

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)

@gopherbot gopherbot added this to the Untriaged milestone Aug 9, 2024
@hyangah
Copy link
Contributor

hyangah commented Sep 5, 2024

Duplicate of #3425
which was closed in favor of golang/go#47479 (gopls).

What's a reasonable unit-test like for generics is still under discussion here. Please chime in. cweill/gotests#165

@hyangah hyangah added upstream-tools Issues that are caused by problems in the tools that the extension depends on. Duplicate Make it obvious when issues are closed as duplicate labels Sep 5, 2024
@hyangah hyangah closed this as completed Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Make it obvious when issues are closed as duplicate upstream-tools Issues that are caused by problems in the tools that the extension depends on.
Projects
None yet
Development

No branches or pull requests

3 participants