Using Go 1.21.0 with Railway
Hey team,
I'm probably missing something obvious, but I'm struggling to upgrade my Go app to Go 1.21.0 on Railway. Here's the output I get:
Clearly the problem is with the Go version nixpacks has installed, and that's understandable because I think the latest version of Go available from NixOS is 1.20.6. My question is: when will I be able to use Go 1.21.0 on Railway? Are there any workarounds until then?
12 Replies
Project ID:
17c92c1f-5d79-4f57-924d-6eb1a3dcf759
correct, the most up to date version of go that nixos has is 1.20.6
https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/compilers/go
this would be the highest version you could use on railway
when will I be able to use Go 1.21.0 on Railwaywhen nixos has go 1.21.0 available
Are there any workarounds until then?yes! do what i do, build with a Dockerfile, the go team automatically releases up to date docker images
Can't you maintain a copy of the existing Go package and just bump the version for yourself?
I've done that for a bunch of apps that don't yet have the latest and greatest version of the app on nixpkgs
sounds like more work than it's worth
Nope
I can use whatever go version I want without having to maintain anything
I just change a number at the top of the dockerfile
Maintenance here would mean just to be updated with the nix expression upstream
If you have that setup, that's easier. But that offloads the issue to the developer
It's fine but just mentioned an alternative you guys could consider
no alternative needed, nix packages has 1.21.1 now
Yeah
I wonder if op still cares
uses go 1.21.1