gojp / goreportcard

A report card for your Go application
https://goreportcard.com
Apache License 2.0
1.99k stars 252 forks source link

Could not analyze the repository: could not download repo #377

Closed wintermi closed 2 years ago

wintermi commented 2 years ago

When I try to refresh the report for my repository - github.com/winterlabs-dev/bqwrite-test

I get the following error message: "There was an error processing your request: Could not analyze the repository: could not download repo: could not get latest module version from https://proxy.golang.org/bqwrite-test/@latest: bad request: invalid escaped module path "bqwrite-test": malformed module path "bqwrite-test": missing dot in first path element"

The proxy.golang.org URL being called to get the latest module version does not match the repository name. If I execute the correct URL - https://proxy.golang.org/github.com/winterlabs-dev/bqwrite-test/@latest

This returns the correct version - {"Version":"v0.2.0","Time":"2022-02-09T05:59:28Z"}

The first time I executed the report, I did not have tags or a release created on github, plus the original module name in "go.mod" was not the fully domain name. Could this be the reason a refresh does not seem to be possible?

shawnps commented 2 years ago

@wintermi this is interesting yeah, if you look at the v0.2.0 go.mod:

https://proxy.golang.org/github.com/winterlabs-dev/bqwrite-test/@v/v0.2.0.mod

The module name is bqwrite-test. pkg.go.dev also shows no results:

https://pkg.go.dev/search?q=github.com%2Fwinterlabs-dev%2Fbqwrite-test

Since the module name is correct in the main branch, If you tag a new release it should work.

wintermi commented 2 years ago

I created a new tag and release as suggested, however this has resolved the issue.

shawnps commented 2 years ago

@wintermi looks like we had an older version cached. I refreshed the report and it's using v0.2.1 now.

wintermi commented 2 years ago

Thanks, everything looks good now.