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: documentation not displayed for HPND-sell-variant license #49504

Closed
xyproto opened this issue Nov 10, 2021 · 10 comments
Closed

x/pkgsite: documentation not displayed for HPND-sell-variant license #49504

xyproto opened this issue Nov 10, 2021 · 10 comments
Labels
FrozenDueToAge pkgsite/license Issues related to licenses on pkg.go.dev. See our license policy https://pkg.go.dev/license-policy pkgsite

Comments

@xyproto
Copy link
Contributor

xyproto commented Nov 10, 2021

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/xyproto/wallutils?utm_source=godoc

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Screenshot

image

What did you do?

Tried to visit and browse the documentation:

http://godoc.org/github.com/xyproto/wallutils

What did you expect to see?

The package documentation.

What did you see instead?

Documentation not displayed due to license restrictions.
See our license policy.

Wallutils is licensed under the MIT license, but the license file contains two of them, separated by --, because the original MIT license has slightly different wording.

@gopherbot gopherbot added this to the pkgsite/license milestone Nov 10, 2021
@D1CED
Copy link

D1CED commented Nov 10, 2021

The license demands that

[...] both that copyright notice and this permission notice appear in supporting documentation [...]

which pkg.go.dev clearly does not do. So the choice of not displaying the documentation is justified.

Edit: And your title is incorrect as you can clearly see from the screenshot that an MIT license variant was detected.

@xyproto
Copy link
Contributor Author

xyproto commented Nov 11, 2021

I see. Thanks for the clarification!

@xyproto xyproto closed this as completed Nov 11, 2021
@xyproto
Copy link
Contributor Author

xyproto commented Nov 11, 2021

After moving the license for wayinfo.h from the LICENSE file into the source file at include/wayinfo.h, thus having just one license in the LICENSE file, the documentation for the package is generated and displayed correctly at pkg.go.dev.

I also changed the license from MIT to BSD-3 for the files that are not in include/wayinfo.h.

Moving license text around in the project made pkg.go.dev generate the API documentation. Is this is expected behavior, or an issue with the documentation generator?

@D1CED
Copy link

D1CED commented Nov 11, 2021

Currently go.dev uses github.com/google/licensecheck to detect a projects license which just has a list of files it goes over. It is a simple tool that does not traverse all files and neither does it look for source code comments that may be a license texts.

Here is the current official policy of go.dev along with a list of all the files that are consulted: https://pkg.go.dev/license-policy

@xyproto
Copy link
Contributor Author

xyproto commented Nov 11, 2021

Using a simple license checker tool instead of a more advanced one is a bug in the pkg.go.dev website, then.

@xyproto xyproto reopened this Nov 11, 2021
@xyproto
Copy link
Contributor Author

xyproto commented Nov 11, 2021

Here is the wallutils commit that was the latest commit on main when this issue was first created: be7e0a39ddba14d7f04f2bf2ef22e739a41f54ab

@seankhliao seankhliao changed the title x/pkgsite: MIT license not detected x/pkgsite: documentation not displayed for HPND-sell-variant license Nov 11, 2021
@seankhliao
Copy link
Member

the license checker correctly identified it as both HPND-sell-variant and MIT
the issue should be that HPND-sell-variant hasn't been approved

@xyproto
Copy link
Contributor Author

xyproto commented Nov 11, 2021

Also, the HPND-sell-variant license only applies to the C header file wayinfo.h, that is not used when generating the documentation.

@rsc
Copy link
Contributor

rsc commented Dec 1, 2021

Looks like it is working now? If you put HPND-sell-variant in your LICENSE file, then pkgsite (and some people) will assume it applies to the whole repo. But it looks like you've taken it out, which will make sense to both pkgsite and people. So I believe this can be closed.

@rsc rsc closed this as completed Dec 1, 2021
@xyproto
Copy link
Contributor Author

xyproto commented Dec 1, 2021

Yes. Thanks for looking into this! I appreciate the automatic generation of documentation at pkg.go.dev.

@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
@golang golang locked and limited conversation to collaborators May 20, 2023
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
Projects
None yet
Development

No branches or pull requests

6 participants