dave / courtney

Courtney is a coverage tool for Go
MIT License
168 stars 27 forks source link

Update Dependencies for golang 1.20 #33

Closed rokek closed 1 year ago

rokek commented 1 year ago

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:

https://github.com/golang/go/issues/37617

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

a4z commented 1 year ago

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

dave commented 1 year ago

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...

rokek commented 1 year ago

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!

dave commented 1 year ago

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 😂