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

go 1.18 wrong interface with gotest.tool #225

Closed
chmouel opened this issue Mar 29, 2022 · 3 comments
Closed

go 1.18 wrong interface with gotest.tool #225

chmouel opened this issue Mar 29, 2022 · 3 comments
Assignees

Comments

@chmouel
Copy link

chmouel commented Mar 29, 2022

Getting this error :

cannot use t (variable of type *testing.T) as “gotest.tools/v3/assert”.TestingT value in argument to env.PatchAll: wrong type for method Log (have func(args ...invalid type), want func(args ...interface{}))
@dnephin
Copy link
Member

dnephin commented Mar 29, 2022

Thank you for the bug report! I have just started using go1.18 and it seems to work ok. I'm not sure what's happening here. I'll PR adding go1.18 to CI to start.

@dnephin
Copy link
Member

dnephin commented Mar 29, 2022

The tests seem happy in #227, and I was able to use env.PatchAll with go1.18 in a project I am working on. I haven't been able to reproduce this error yet.

have func(args ...invalid type)

That part of the error message is surprising. I wonder why it says "invalid type".

@chmouel
Copy link
Author

chmouel commented Mar 30, 2022

@dnephin I looked a bit more into it yesterday and after some fiddling trying to figure out the issue,

It seems that the issue happen with when using gopls from homebrew , if I switch it with a gopls from go install golang.org/x/tools/gopls@latest it doesn't show the error anymore....

they are both using 0.8.1

I see there is some fix around gopls and generics here golang/go#52015 perhaps it's related?

anywhoo probably not an issue with gotest.tools and this issue may be closed,

@dnephin dnephin closed this as completed Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants