dave / courtney

Courtney is a coverage tool for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update Dependencies for golang 1.20

rokek opened this issue · comments

commented

After updating from golang 1.19.6 to 1.20.1 I was unable to run tests with courtney because I received errors like this:

internal error: package "encoding/json" without types was imported from "<<MY PACKAGE NAME>>"

I reverted to 1.19.6 as a workaround and that stopped the errors. Search results suggest that others have resolved similar errors by building with a more current version of dependencies like golang.org/x/tools, for example:

golang/go#37617

Thank you for this project, I find it very helpful!

commented

I have a very similar problem, and it's possibly related.

internal error: package "database/sql" without types was imported from my/package/name

This happens only with golang 1.20, not with golang 1.19

It would be great if that could be fixed since I like courtney a lot

I'm travelling in Asia for the next few months so probably won't have any time to look at this in the near future... if someone can fix it and submit a PR i'll happily merge...

commented

I'll be happy to submit a PR, though I'm curious if there is anything that I should know about running tests for it. I assume you use courtney to test courtney 😆

Also, is any version of golang.org/x/tools preferred, or should I first try with the latest-available?

https://github.com/golang/tools/tags

Thank you again!

Yeah it's been years since I worked on this code, so I really have no idea... to be honest I would have to read the readme to jog my memory of what this package does 😂