x/pkgsite: make LICENSE detection optional in pkgsite codebase (not in pkg.go.dev) #39602
However, private code almost always does not have a LICENSE file in its root repository because employees typically sign a separate agreement stating that the internal code is not to be copied or shared.
This means that
One option is to go around and add an appropriate LICENSE for all of the private code that both
Therefore, it seems like the best option is to add a new configuration to
The text was updated successfully, but these errors were encountered:
This does not solve this issue, as it is not a pull request, but I have a project that will hard code license respecting off and run
I could figure out how to solve this with a flag, then create & submit pull request, unless the Go team is already on the issue.
I was able to use
Add a mode to postgres.DB where data is saved even if the module or package is not redistributable. This "bypassing license restrictions" mode is off by default. Add a flag to the worker binary to turn it on. Used a flag rather than an environment variable so there is no way for ambient state to affect the binary for this important decision. Also: - Add a test to verify that license data is removed/not removed depending on the bypass setting. - Fix a bug where the new model insertion wasn't omitting documentation for non-redistributable modules. - Fix a bug in internal/sample where the top-level readme wasn't getting populated. A later CL will change the frontend to bypass the check. For golang/go#39602 For golang/go#39629 Change-Id: I67a6d24c18f3b93cfbfc9ec2a20159c07a84e077 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/246957 Reviewed-by: Julie Qiu <email@example.com> Run-TryBot: Julie Qiu <firstname.lastname@example.org> TryBot-Result: kokoro <email@example.com>
The postgres package removes non-redistributable data during insertion. Also remove it when reading, unless bypassLicenseCheck is true. Handling this in the DataSource layer simplifies frontend code, which can avoid redistributability checks and knowing about the bypass flag except when it constructs its DataSource. As part of this work, move the removal of non-redistributable data to the internal package, so it can eventually be used by the proxy data source. For golang/go#39602 Change-Id: Ia1362ead917b42f844b4c4d25ade74cdcb03d4dc Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/250017 Reviewed-by: Julie Qiu <firstname.lastname@example.org>
…arch - Unexport upsertSearchDocuments and verify that at its sole call site, non-redistributable data is removed unless the bypass flag is true. This "fixes" golang/go#40971, which was never actually broken. - Remove non-redistributable data in GetPackagesForSearchDocumentUpsert. (This was a legitimate bug, although one that never had any effect.) Fixes golang/go#40971 For golang/go#39602 Change-Id: I35493739de3a4ac0694ad3f07a371d9873f31b52 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/250637 Reviewed-by: Julie Qiu <email@example.com>
Remove non-redistributable data from modules that aren't redistributable, unless a bypass option is set. For golang/go#39602 Change-Id: I7832c60b2ac855b257ccfb776c87d05313e43cd2 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/250818 Reviewed-by: Julie Qiu <firstname.lastname@example.org>