bluesky-social / indigo

Go source code for Bluesky's atproto services.
https://atproto.com
Apache License 2.0
919 stars 120 forks source link

fix pkg.go.dev license detection #431

Closed bnewbold closed 1 year ago

bnewbold commented 1 year ago

derp, pkg.go.dev doesn't know what to do with the MIT-or-Apache license, and as a result won't render docs.

eg: https://pkg.go.dev/github.com/bluesky-social/indigo/atproto/crypto

we can file a bug report, or try to re-format LICENSE.txt so it doesn't trigger this (eg, detect as MIT, which is fine for us), or potentially even move the "or apache" part to a separate PATENTS.txt file.

annoying!

erka commented 1 year ago

Github isn't happy about LICENSE.txt too. image

Probably try to reformat that file is the first option.

bnewbold commented 1 year ago

I tried tweaking LICENSE.txt in https://github.com/bluesky-social/indigo/pull/445 and that didn't fix it. As you mention Github is also confused but that doesn't really matter for the golang pkg website. Which is a great resource to host rendered docs!

A similar existing repo that does work is ipfs/kubo: https://pkg.go.dev/github.com/ipfs/kubo?tab=licenses

I tried downloading the licensecheck golang lib mentioned on pkg.go.dev and it gave higher confidence with the tweaked LICENSE.txt, which gave me hope that would fix it, but still get "License: UNKNOWN": https://pkg.go.dev/github.com/bluesky-social/indigo

I'm not sure if there is a specific confidence threshold or expected format or what.

erka commented 1 year ago

ipfs/go-ds-badger4 and ipfs/boxo have similar licenses and it works great. But ipfs/gateway-conformance has the same files as ipfs/kubo and it has the same issue as indigo. It looks something wrong or some manual work was done.

bnewbold commented 1 year ago

Finally resolved this in f8ba20dc70977589322ff20abe52bfc49796b8bb after testing a few variations as separate repos.

h/t to @imax9000 in https://github.com/bluesky-social/indigo/commit/956bf059c93a870f30ac66170777f0513d096d60 who traced it down to the LICENSE file name. renaming to LICENSE-DUAL made pkg.go.dev happy.