Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(cmd/gf): fix go mod sum#4269

Closed
cococolanosugar wants to merge 2 commits intogogf:masterfrom
cococolanosugar:fix/goframe-cli
Closed

fix(cmd/gf): fix go mod sum#4269
cococolanosugar wants to merge 2 commits intogogf:masterfrom
cococolanosugar:fix/goframe-cli

Conversation

@cococolanosugar
Copy link
Contributor

No description provided.

@cococolanosugar
Copy link
Contributor Author

cococolanosugar commented May 6, 2025

@gqcn

Please maintain a correct and complete go.sum file for the gf cli.

Go version

go version go1.22.2 linux/amd64

GoFrame version

v2.9.0

Can this bug be reproduced with the latest release?

Yes

What did you do?

cd cmd/gf
export GOWORK=off
go mod vendor

What did you see happen?

go: github.com/gogf/gf/cmd/gf/v2 imports
        github.com/gogf/gf/v2/errors/gerror: missing go.sum entry for module providing package github.com/gogf/gf/v2/errors/gerror (imported by github.com/gogf/gf/cmd/gf/v2); to add:
        go get github.com/gogf/gf/cmd/gf/v2
go: github.com/gogf/gf/cmd/gf/v2 imports
        github.com/gogf/gf/v2/os/gctx: missing go.sum entry for module providing package github.com/gogf/gf/v2/os/gctx (imported by github.com/gogf/gf/cmd/gf/v2); to add:
        go get github.com/gogf/gf/cmd/gf/v2

...

What did you expect to see?

These commands should execute correctly without needing go mod tidy.

cd cmd/gf
export GOWORK=off
# go mod tidy
go mod vendor
go build -mod=vendor .

Why?

This is helpful when using Nix Flake to manage development environment.
An incorrect go.sum file may block another PR of mine in the future.

@hailaz
Copy link
Contributor

hailaz commented Jun 12, 2025

这里还需要考虑一个问题,就是打tag的时候,主库的tag和cli的tag是同时发布的,所以才导致go.sum无法获取最新版的数据。

@hailaz hailaz added need more details discuss We need discuss to make decision. CLI about gf cli and removed need more details labels Jun 12, 2025
@cococolanosugar
Copy link
Contributor Author

参考其他开源社区的解决方案,或许可以把release分为两个:

  1. 主体框架的release 其tag为 tag/v1.x.x
  2. 工具相关的release 其tag为 tag/cmd/gf/v1.x.x

@hailaz
Copy link
Contributor

hailaz commented Jun 14, 2025

参考其他开源社区的解决方案,或许可以把release分为两个:

  1. 主体框架的release 其tag为 tag/v1.x.x
  2. 工具相关的release 其tag为 tag/cmd/gf/v1.x.x

现在就是两个,到时候看看调整一下流水线,让他先后发版

@hailaz hailaz self-assigned this Aug 22, 2025
@hailaz hailaz mentioned this pull request Sep 2, 2025
@hailaz hailaz closed this in #4412 Sep 2, 2025
hailaz added a commit that referenced this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI about gf cli discuss We need discuss to make decision.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants