Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: docs not shown for packages with broken licenses #39388

Closed
epelc opened this issue Jun 3, 2020 · 9 comments
Closed

x/pkgsite: docs not shown for packages with broken licenses #39388

epelc opened this issue Jun 3, 2020 · 9 comments
Labels
FrozenDueToAge pkgsite/license Issues related to licenses on pkg.go.dev. See our license policy https://pkg.go.dev/license-policy pkgsite WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@epelc
Copy link

epelc commented Jun 3, 2020

I think pkg.dev.go should show go docs regardless of license if the code is available on github or any other site go get supports. If it is public there I do not see why docs can not be shown for it in a nice format under fair use laws. Godoc.org shows docs regardless of license and in this case it was due to licensecheck not detecting an apache 2 license correctly for the go sparkpost repo.

What is the URL of the page with the issue?

pkg.dev.go doesn't show any docs if the license can't be found.

What is your user agent?

Google Chrome
Version 83.0.4103.61 (Official Build) (64-bit)

Screenshot

image

What did you do?

Go to https://pkg.go.dev/github.com/SparkPost/gosparkpost?tab=overview

What did you expect to see?

Docs for the code.

What did you see instead?

A near empty page.

@gopherbot gopherbot added this to the Unreleased milestone Jun 3, 2020
@robpike
Copy link
Contributor

robpike commented Jun 4, 2020

This behavior is indeed unfortunate, but I believe the issue is that if a license cannot be detected, it's possible that showing the documentation would violate the (undetectable) license. Of course that is unlikely, but caution before enthusiasm.

The right thing to do here might be a clarification in the policy that is linked from the page.

@epelc
Copy link
Author

epelc commented Jun 4, 2020

Was there some specific legal review or takedown request that caused this default change? I would think it’d fall under fair use as the docs site isn’t republishing the entire code, only the api.

Anyways if the legal portion can’t be figured easily maybe a script or links to how to run a local go doc server to view docs for the package could be added to these pages.

Would be interesting if there are any stats on how many packages the license checker fails to detect. Could definitely shed more light on if this is important or not.

@julieqiu
Copy link
Member

julieqiu commented Jun 4, 2020

/cc @jba

@julieqiu julieqiu added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed Documentation labels Jun 4, 2020
@jba
Copy link
Contributor

jba commented Jun 4, 2020

There was an extensive thread on golang-dev about this with an important post by Russ Cox. I recommend reading it (the post, not necessarily the entire thread). The relevant part for this issue is

The rule we've been given to follow is that serving a pretty HTML version of the docs is displaying a modified version of the original, and we can only do that if there's a recognized known-good license that gives us that permission.

Russ's post also discusses why godoc.org doesn't check licenses, and provides stats on license detection.

We're committed to displaying every package that we're allowed to, so if there are specific packages that fail to show despite having what you believe to be a valid license, let us know and we'll try to fix the problems.

@jba jba removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 4, 2020
@jba jba self-assigned this Jun 4, 2020
@epelc
Copy link
Author

epelc commented Jun 4, 2020

Thanks for the detailed info @jba!

1,200 modules does seem like a large enough number to make adding a one liner or short script for running go doc locally and viewing the given package there instead worth it.

I opened an issue the other day with gosparkpost to fix the license detection. SparkPost/gosparkpost#155 Not sure if this is a simple change on their end or a bug with the license checker.

@julieqiu julieqiu added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jun 8, 2020
@julieqiu julieqiu changed the title go.dev: docs not shown for packages with broken licenses x/pkgsite: docs not shown for packages with broken licenses Jun 15, 2020
@epelc
Copy link
Author

epelc commented Jun 18, 2020

@julieqiu are you waiting for info from me? I linked the issue in specific repo I encountered license issues on.

I think adding a script to run locally to the error message displayed on repos with bad license would be helpful to solve this.

@jba
Copy link
Contributor

jba commented Jun 18, 2020

It's my fault, I didn't follow up on that issue. Will do so today.

Now that we're open-source, anyone can run our license detection code.

@jba
Copy link
Contributor

jba commented Jun 18, 2020

They're using variant wording that falls below our detection threshold. I commented on the issue.

@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/licenses Aug 27, 2020
@jba
Copy link
Contributor

jba commented Jan 17, 2021

@jba jba closed this as completed Jan 17, 2021
@golang golang locked and limited conversation to collaborators Jan 17, 2022
@hyangah hyangah added the pkgsite/license Issues related to licenses on pkg.go.dev. See our license policy https://pkg.go.dev/license-policy label May 20, 2022
@rsc rsc unassigned jba Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge pkgsite/license Issues related to licenses on pkg.go.dev. See our license policy https://pkg.go.dev/license-policy pkgsite WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants