-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unable to build with xcaddy and docker - Downgrade required Go version to 1.21 #3
Comments
Thanks for identifying this. It's a bit silly that a caddy module is unable to build with caddy 🤦. This repo will need some CI checks to prevent such a regression in the future. I could downgrade, but I'm pretty sure xtemplate is already using the for loop variable declaration language change in a few places. This isn't a big deal, but will require me to review loops carefully. |
You're welcome. FYI, I was able to build xtemplate with upgraded xcaddy on my cloned repo. I can go on testing xtemplate (well, currently, I'm focused on Caddy Security, xtemplate will be my next step). So, from my POV, it's up to you to fix this issue or to wait for Caddy 2.8.0 (within a month wrote Francis). |
I remembered why Go 1.22 is actually required: xtemplate now uses the builtin I moved to this because I'd rather use the stdlib if it supports the required features instead of maintaining my own library, so I won't be downgrading xtemplate to Go 1.21. Unfortunately this is a problem for Footnotes |
I updated the readme to include a method of building with xcaddy that references a caddy commit that seems to be working, as well as a go module-based way to build that also works. This should tide us over until caddy releases the next version. |
As Caddy 2.8 is now out, I think this is not an issue anymore. |
I haven't done the Docker release for 2.8.0 yet, but yeah. |
Please, have a look to caddyserver/caddy-docker#333 and @francislavoie's comment.
I tried to build Caddy with xcaddy using a Dockerfile. It failed due to xtemplate that requires Go version 1.22.1. xcaddy-builder container currently runs with Go 1.21.
You should downgrade this requirement, at least until Caddy 2.8.0 is released.
The text was updated successfully, but these errors were encountered: