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 #358

Closed YYCoder closed 2 years ago

YYCoder commented 2 years ago

I've tried a couple of times for my project github.com/YYCoder/thrifter, everything works fine when I use the command-line interface, but when I use the web interface, it shows errors as below:

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/github.com/YYCoder/thrifter/@latest: bad request: invalid escaped module path "github.com/YYCoder/thrifter"

it says could not get latest module version, but I have tried go get github.com/YYCoder/thrifter@latest, no error occurs.

here is my project output using the command-line interface, it worked:

image

shawnps commented 2 years ago

@YYCoder it looks like an error from proxy.golang.org:

https://proxy.golang.org/github.com/YYCoder/thrifter/@latest

I'm searching around to see why this might be.

shawnps commented 2 years ago

@YYCoder it looks like the code the proxy uses for checking module paths expects lowercase:

https://github.com/golang/mod/blob/master/module/module.go#L738

Working on a fix

YYCoder commented 2 years ago

@YYCoder it looks like the code the proxy uses for checking module paths expects lowercase:

https://github.com/golang/mod/blob/master/module/module.go#L738

Working on a fix

Thanks for your quick reply, it worked after I change my module path to github.com/yycoder/thrifter, but it would be better to provide a way that users don't have to deal with.

shawnps commented 2 years ago

@YYCoder yup you're right, unfortunately it wasn't as easy to fix as I initially thought. I'll keep working on it, thanks for raising this issue 👍

shawnps commented 2 years ago

@YYCoder I believe this is fixed now. Feel free to reopen this issue if you see the problem again.