Skip to content

Add make update-go#36541

Closed
silverwind wants to merge 3 commits intogo-gitea:mainfrom
silverwind:updatego
Closed

Add make update-go#36541
silverwind wants to merge 3 commits intogo-gitea:mainfrom
silverwind:updatego

Conversation

@silverwind
Copy link
Copy Markdown
Member

Add convenience command make update-go to update all go dependencies. updates now fully supports handling go dependencies.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 6, 2026
@silverwind silverwind added skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. and removed modifies/internal modifies/dependencies labels Feb 6, 2026
Copy link
Copy Markdown
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should use golang's go get -u ./...

It doesn't make sense to use a non-Golang-ecosystem update tool.

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 6, 2026
@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Feb 6, 2026

go get -u ./...

The tool is much faster than go get and already in use for other dependency types. Also is supports a config file where you can lock/pin dependencies.

Nothing prevents you from using go get, this is mostly for me personally.

@wxiaoguang
Copy link
Copy Markdown
Contributor

Nothing prevents you from using go get, this is mostly for me personally.

Then you can use Makefile.local

sinclude Makefile.local

@wxiaoguang
Copy link
Copy Markdown
Contributor

The tool is much faster than go get and already in use for other dependency types.

If it is "faster", then it's likely that you skipped some steps, or package downloading. The "saved" time will be repaid later. Unless you 100% reproduce Golang's behavior, or directly call "go get -u", I don't see why it can be right.

@wxiaoguang
Copy link
Copy Markdown
Contributor

Also is supports a config file where you can lock/pin dependencies.

The official approach to lock a package's version is using "replace" in go.mod

@silverwind
Copy link
Copy Markdown
Member Author

If it is "faster", then it's likely that you skipped some steps

No, nothing is skipped. go get is slow because its conservative with parallel requests and waits longer for timeouts while polling major release version.

@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Feb 6, 2026

Also is supports a config file where you can lock/pin dependencies.

The official approach to lock a package's version is using "replace" in go.mod

But that's inconsistent with js or python.

@wxiaoguang
Copy link
Copy Markdown
Contributor

Also is supports a config file where you can lock/pin dependencies.

The official approach to lock a package's version is using "replace" in go.mod

But that's inconsistent with js or python.

I don't care about Golang packages should be consistent with js or python.

Golang syntax isn't consistent with js or python.

Golang go.mod isn't consistent with js or python.

Golang toolchain commands are not consistent with js or python.

I don't see why it should reinvent the wheels to manage Golang dependencies.

https://en.wikipedia.org/wiki/Occam%27s_razor

You can add a make target if you really need it and are going to maintain the dependencies, but I believe it can simply use go get -u with replace for version locking.

@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Feb 6, 2026

I prefer one tool to manage all dependencies instead of having to deal with 5 different tools. Ultimately it will lead to me not being motivated to update go dependencies and we are already lagging behind on many. If you like to demotivate me, so do it.

Signed-off-by: silverwind <me@silverwind.io>
@wxiaoguang
Copy link
Copy Markdown
Contributor

I prefer one tool to manage all dependencies instead of having to deal with 5 different tools. Ultimately it will lead to me not being motivated to update go dependencies and we are already lagging behind on many. If you like to demotivate me, so do it.

I don't mean to "demotivate". At least, I think you can start using your tool to upgrade the go dependencies and prove that it really works, before introducing it without really using it.

Signed-off-by: silverwind <me@silverwind.io>
@silverwind
Copy link
Copy Markdown
Member Author

I don't feel like talking against a wall.

@silverwind silverwind closed this Feb 6, 2026
@wxiaoguang
Copy link
Copy Markdown
Contributor

I don't feel like talking against a wall.

Me too, and I don't like fixing bugs for a wall.

@wxiaoguang
Copy link
Copy Markdown
Contributor

wxiaoguang commented Feb 6, 2026

update go #36546

You can see there are still problems when upgrading, I don't think your tool have handled it, or it's worth to spend time to fully reinvent a go get command in your tool.

go: github.com/go-ini/ini@v1.67.1: parsing go.mod:
        module declares its path as: gopkg.in/ini.v1
                but was required as: github.com/go-ini/ini
        restoring github.com/go-ini/ini@v1.67.0

And you can see upgrading blindly just fails, Golang ecosystem is not like JS ecosystem.


If you think I was "demotivating", feel free to edit that PR to handle these problems to show that your tool is right.

@wxiaoguang wxiaoguang mentioned this pull request Feb 7, 2026
@silverwind silverwind deleted the updatego branch February 10, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged modifies/dependencies 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.

3 participants