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

[BUG] Compile error when orchestrion has been installed with a lower go version than the one in use #298

Open
eliottness opened this issue Sep 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@eliottness
Copy link
Contributor

eliottness commented Sep 27, 2024

Version of orchestrion
v0.9.0

Describe what happened:

I was reviewing #292 when I saw this after a fresh clone of https://github.com/traefik/traefik.git on commit d317cd90fcb579722ab29c35410c10b6a135f949 (main)

image

Describe what you expected:

I was expection the build to succeed because go build . does

Steps to reproduce the issue:

Additional environment details (Version of Go, Operating System, etc.):
Go version: v1.22.7

@eliottness eliottness added the bug Something isn't working label Sep 27, 2024
@RomainMuller
Copy link
Contributor

Yeah so traefik's go.mod has go 1.23 so it's expected it won't build wth go 1.22... In this case, the go toolchain automatically uses a more recent compiler to "make it work" (because GOTOOLCHAIN was not set to local?).

The issue here is that while we end up using a go 1.23 compiler, the go AST & type checker package being used by orchestrion is the one it was built with, in this case 1.22, which prevents it from properly loading up in this case.

Short term, we should detect this situation and emit a clear warning; or bail out with a clear error indicating what the user should do (likely, re-build their local orchestrion with the proper toolchain).

Longer term, we might consider re-spawning orchestrion with the correct toolchain, since we have a full compiler toolchain available anyway...

@eliottness eliottness changed the title [BUG] Compile error when building traefik with go 1.22.7 [BUG] Compile error when orchestrion has been installed with a lower go version than the one in use Oct 23, 2024
@eliottness
Copy link
Contributor Author

Short term answer is to upgrade you Go toolchain and to reinstall orchestrion with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants