-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve the messages reported for the user when cachi2 check/download the toolchain #684
Comments
Because 1.20 handles all versions up this one equally, it is 1.21 that introduced changes that somewhat break backwards compatibility when it comes to processing dependencies (i.e. not related to compiling modules) and so we decided to pre-install 1.20 instead of trying to process old Go projects with exactly the same language version of Go as it's pointless (old Go's didn't pose the strict minimum toolchain requirements on projects and their dependencies).
That is on purpose, because the format change of the version string X.Y.Z came with 1.21 and so if you tried to use 1.18.0 and tried running any
It is, you just don't see it / can't figure it out from the logs (#550), but it does use 1.23 ! What happens here is that we only log the toolchain that we found, but not the one that ends up being used by Go, why? Because we're not in charge of using that newer toolchain, we just set
Agreed, but keep in mind that sometimes even Go fails silently with some operations (parameter combinations), especially when automatic toolchain fetching is involved and so we may not always be able to extract the info you'd like to see because even we don't have it. |
It's also worth mentioning that we're keeping 1.21 pre-installed due to the need to refactor big parts of the whole gomod module's logic, which is due, which will happen over time, but thanks to the |
@cmoulliard unless #684 (comment) doesn't answer the main pain points you raised would you agree to closing this one as a duplicate of #550? |
That adresses the questions but not really the issue itself as no code/PR has been submitted to improve the messages displayed and to let the users to figure out what they should do |
If the issue 550 also covers the content of my issue, then I'm fine to close it but AFAIK the issue of 550 only covers a subset |
Issue
This is not evident for the end user to understand sometimes the internal logic used by Cachi2 to check/download the go SDK
See some examples hereafter
Using go version 1.18
Repository of the project: https://github.com/redhat-buildpacks/fork-jam/blob/main/go.mod#L3
branch: main
go.mod version: 1.18
Questions:
1.18.0
?Using go version 1.23.0 =>
Repository of the project: https://github.com/redhat-buildpacks/fork-libpak/blob/bump-go-version/go.mod#L3
branch: bump-go-version
go.mod version: 1.23.0
Question: Why is cachi2 using go 1.21 and not 1.23 ?
Using go 1.22.0
Repository of the project: https://github.com/redhat-buildpacks/fork-pack/blob/bump-go-version/go.mod#L146
branch: bump-go-version
go.mod version: 1.22.0
This is not clear for a user to understand why cachi2 fails to download the toolchain 1.22. A more user friendly message should be
logged to explain the root cause
My issue is related too to this one: #550
The text was updated successfully, but these errors were encountered: