Skip to content

Commit 333a986

Browse files
silverwindGiteaBot
authored andcommitted
Disable go license generation as part of make tidy (go-gitea#33747)
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 ```
1 parent 27a60fd commit 333a986

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,8 @@ unit-test-coverage:
508508
tidy:
509509
$(eval MIN_GO_VERSION := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2))
510510
$(GO) mod tidy -compat=$(MIN_GO_VERSION)
511-
@$(MAKE) --no-print-directory $(GO_LICENSE_FILE)
511+
# disabled because of issues related to https://github.com/google/go-licenses/issues/128
512+
# @$(MAKE) --no-print-directory $(GO_LICENSE_FILE)
512513

513514
vendor: go.mod go.sum
514515
$(GO) mod vendor
@@ -527,7 +528,7 @@ tidy-check: tidy
527528
go-licenses: $(GO_LICENSE_FILE)
528529

529530
$(GO_LICENSE_FILE): go.mod go.sum
530-
-$(GO) run $(GO_LICENSES_PACKAGE) save . --force --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
531+
-$(GO) run $(GO_LICENSES_PACKAGE) save . --force --save_path=$(GO_LICENSE_TMP_DIR)
531532
$(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE)
532533
@rm -rf $(GO_LICENSE_TMP_DIR)
533534

0 commit comments

Comments
 (0)