Closed giangnh13579 closed 3 weeks ago
@giangnh13579 We recently bumped the minimum go version of this repo to 1.22. Update your toolchain and try again.
@giangnh13579 We recently bumped the minimum go version of this repo to 1.22. Update your toolchain and try again.
My application is running on Golang version 1.21, and I'm not sure if it will crash if I update to version 1.22.
For anyone facing the same issue, I separated the build stages in Docker: one stage uses version 1.21 to build the application, and another uses version 1.22 to build the async tool into a binary file. Then, I copy the files built from each stage into the final container.
FROM golang:1.21-alpine as build
...build your app here
FROM golang:1.22-alpine as build-asynq
WORKDIR /app
RUN apk update && apk add --no-cache git
ARG CGO_ENABLED=0
RUN go install github.com/hibiken/asynq/tools/asynq@latest
## Runtime stage
FROM alpine:3.16.2
...
# copy asynq tools built file
COPY --from=build-asynq /go/bin/asynq ./asynq
....
My application is running on Golang version 1.21, and I'm not sure if it will crash if I update to version 1.22.
Go guarantees backward compatibility, just not forward.
Describe the bug Cannot install asynq tools latest version with golang 1.21.1 in docker environment
To Reproduce Steps to reproduce the behavior (Code snippets if applicable):
Expected behavior
Environment (please complete the following information):
asynq
package:v0.24.1
Additional context I've checked the commit history and see a commit that seems to cause this error https://github.com/hibiken/asynq/commit/013190b8244f614d57a522018506a6e24a2b8fc0 . I think I can install previous asynq tools but I can not find the version.
How can I install asynq tools with golang v1.21.1?