Skip to content
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

Feature: rebuild with newer toolchain if available, even if version same #154

Closed
scop opened this issue Jun 16, 2024 · 3 comments · Fixed by #156
Closed

Feature: rebuild with newer toolchain if available, even if version same #154

scop opened this issue Jun 16, 2024 · 3 comments · Fixed by #156

Comments

@scop
Copy link
Contributor

scop commented Jun 16, 2024

Is your feature request related to a problem?

Even if an executable is up to date with the latest upstream, it may have been built with an older version of the Go toolchain than what is available on the system. Newer toolchains may fix bugs, improve performance etc in executables even if the upstream version has not changed.

Describe the solution you'd like

gup to take build and available toolchain versions into effect on check and update.

So if tool X is installed but built let's say with Go 1.22.2 and the system has Go 1.22.4 available, rebuild X with 1.22.4 as an update even if the upstream version does not change. And similarly for check.

Describe alternatives you've considered

Manually removing and reinstalling all executables when upgrading Go.

Additional context

https://pkg.go.dev/runtime/debug#BuildInfo GoVersion

@nao1215
Copy link
Owner

nao1215 commented Jun 16, 2024

@scop

Thank you for your suggestion. I agree with your one.

However, the current specification of gup might already behave as you propose. gup always executes go install without checking the necessity for an update. I believe that executing go install will always update the binaries under $GOPATH/bin.

However, it might be necessary to output the go version (toolchain verison) used during the build process.

@scop
Copy link
Contributor Author

scop commented Jun 17, 2024

Ah, that's right, it does indeed always update. But it also says "Already up-to-date" which is misleading, would seem that just addressing that and taking it also into consideration what to suggest updating in the gup check would be a good fix.

@scop
Copy link
Contributor Author

scop commented Jun 18, 2024

WIP PR in #156. Contains some test failures still, but basics are there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants