Skip to content

Disable go license generation as part of make tidy #33747

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

Merged
merged 3 commits into from
Feb 28, 2025

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Feb 28, 2025

It seems something broken google/go-licenses (maybe related to go 1.24), and my findings are in google/go-licenses#128 (comment). I think it's best we disable this generation for now until a better solution is found.

Also, enable showing stderr output so we can actually debug this thing. For reference, these are the errors that currently apparently break the tool:

E0228 05:15:27.005759   13158 library.go:117] Package text/tabwriter does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.
E0228 05:15:27.005776   13158 library.go:117] Package net/http/fcgi does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.
F0228 05:15:27.028122   13158 main.go:77] some errors occurred when loading direct and transitive dependency packages

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 28, 2025
@silverwind silverwind added the backport/v1.23 This PR should be backported to Gitea 1.23 label Feb 28, 2025
@silverwind silverwind added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Feb 28, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 28, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 28, 2025
@silverwind
Copy link
Member Author

Merging as this is blocking quite a few PRs now.

@silverwind silverwind enabled auto-merge (squash) February 28, 2025 11:00
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 28, 2025
@silverwind silverwind merged commit 6e475dc into go-gitea:main Feb 28, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Feb 28, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 28, 2025
@silverwind silverwind deleted the nolic branch February 28, 2025 11:32
@wxiaoguang
Copy link
Contributor

Merging as this is blocking quite a few PRs now.

Wait, why we merge it into main?

I do not see any PR targeting "main" is blocked.

Only these "1.23" PRs are blocked.

Correct me if I was wrong.

@silverwind
Copy link
Member Author

main had the problem with OS variance (#33745), so as a short-term measure I decided to have it on both branches.

@wxiaoguang
Copy link
Contributor

main had the problem with OS variance (#33745), so as a short-term measure I decided to have it on both branches.

But that's a different problem, we shouldn't disable it on main branch.

@silverwind
Copy link
Member Author

silverwind commented Feb 28, 2025

Feel free to re-enable, but personally I have enough of google/go-licenses, it's a broken tool imho.

I think we will be better off replacing the licenses.txt with a SBOM file, could be generated with tools like https://github.com/aquasecurity/trivy. Or just remove it entirely.

@wxiaoguang
Copy link
Contributor

Feel free to re-enable, but personally I have enough of google/go-licenses, it's a broken tool imho.

I think we will be better off replacing the licenses.txt with a SBOM file, could be generated with tools like https://github.com/aquasecurity/trivy. Or just remove it entirely.

If you think the tool should be removed, then we should also remove the generated "go-license.json", because it will be out-of-sync soon.

So either:

  • Revert go-licenses tool
  • Remove go-license.json

and also cc the approvers @delvh @lunny

@silverwind
Copy link
Member Author

Let's discuss in #33749.

GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Feb 28, 2025
It seems something broken `google/go-licenses` (maybe related to go
1.24), and my findings are in
google/go-licenses#128 (comment).
I think it's best we disable this generation for now until a better
solution is found.

Also, enable showing stderr output so we can actually debug this thing.
For reference, these are the errors that currently apparently break the
tool:

```
E0228 05:15:27.005759   13158 library.go:117] Package text/tabwriter does not have module info. Non go modules projects are no longer supported. For feedback, refer to google/go-licenses#128.
E0228 05:15:27.005776   13158 library.go:117] Package net/http/fcgi does not have module info. Non go modules projects are no longer supported. For feedback, refer to google/go-licenses#128.
F0228 05:15:27.028122   13158 main.go:77] some errors occurred when loading direct and transitive dependency packages
```
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Feb 28, 2025
lunny pushed a commit that referenced this pull request Mar 1, 2025
Backport #33747 by @silverwind

It seems something broken `google/go-licenses` (maybe related to go
1.24), and my findings are in
google/go-licenses#128 (comment).
I think it's best we disable this generation for now until a better
solution is found.

Also, enable showing stderr output so we can actually debug this thing.
For reference, these are the errors that currently apparently break the
tool:

```
E0228 05:15:27.005759   13158 library.go:117] Package text/tabwriter does not have module info. Non go modules projects are no longer supported. For feedback, refer to google/go-licenses#128.
E0228 05:15:27.005776   13158 library.go:117] Package net/http/fcgi does not have module info. Non go modules projects are no longer supported. For feedback, refer to google/go-licenses#128.
F0228 05:15:27.028122   13158 main.go:77] some errors occurred when loading direct and transitive dependency packages
```

Co-authored-by: silverwind <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 3, 2025
* giteaofficial/main:
  Use pullrequestlist instead of []*pullrequest (go-gitea#33765)
  Upgrade act to 0.261.4 and actions-proto-go to v0.4.1 (go-gitea#33760)
  Webhook add X-Gitea-Hook-Installation-Target-Type Header (go-gitea#33752)
  Fix dynamic content loading init problem (go-gitea#33748)
  [skip ci] Updated translations via Crowdin
  Add composor source field (go-gitea#33502)
  upgrade go-crypto from 1.1.5 to 1.1.6 (go-gitea#33745)
  Disable go license generation as part of `make tidy` (go-gitea#33747)
  Refactor repo-diff.ts (go-gitea#33746)
  Use `git diff-tree` for `DiffFileTree` on diff pages (go-gitea#33514)
  [skip ci] Updated translations via Crowdin
  Improve "generate new access token" form (go-gitea#33730)
  Remove superflous tw-content-center (go-gitea#33741)
  Clone repository with Tea CLI (go-gitea#33725)
  allow filtering /repos/{owner}/{repo}/pulls by target base branch queryparam (go-gitea#33684)
  Show info about maintainers are allowed to edit a PR (go-gitea#33738)
  Improve admin user view page (go-gitea#33735)
  [skip ci] Updated translations via Crowdin
  Align sidebar gears to the right (go-gitea#33721)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/internal skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants