8000 fix(cmd/gf): fix go mod sum by cococolanosugar · Pull Request #4269 · gogf/gf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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
Collaborator
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
Collaborator
hailaz commented Jun 14, 2025

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

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

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

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
0