greysteil.
greysteil.
RRailway
Created by greysteil. on 8/10/2023 in #✋|help
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:
==============
Using Nixpacks
==============

context: 7458ed1512f201f973081fea9b02a9ca

╔══════ Nixpacks v1.12.0 ══════╗
║ setup │ go ║
║──────────────────────────────║
║ install │ go mod download ║
║──────────────────────────────║
║ build │ go build -o out ║
║──────────────────────────────║
║ start │ ./out ║
╚══════════════════════════════╝


...

#14 [stage-0 8/8] RUN --mount=type=cache,id=s/17c92c1f-5d79-4f57-924d-6eb1a3dcf759-/root/cache/go-build,target=/root/.cache/go-build go build -o out

#14 0.513 pkg/services/analyzedocumentservice/analyze_document_service.go:4:2: package cmp is not in GOROOT (/nix/store/a7875alzpnr46z6mv4ssymfdwmvr6xbq-go-1.19.4/share/go/src/cmp)
#14 0.513 pkg/api/middleware/user_allowlist.go:8:2: package slices is not in GOROOT (/nix/store/a7875alzpnr46z6mv4ssymfdwmvr6xbq-go-1.19.4/share/go/src/slices)

==============
Using Nixpacks
==============

context: 7458ed1512f201f973081fea9b02a9ca

╔══════ Nixpacks v1.12.0 ══════╗
║ setup │ go ║
║──────────────────────────────║
║ install │ go mod download ║
║──────────────────────────────║
║ build │ go build -o out ║
║──────────────────────────────║
║ start │ ./out ║
╚══════════════════════════════╝


...

#14 [stage-0 8/8] RUN --mount=type=cache,id=s/17c92c1f-5d79-4f57-924d-6eb1a3dcf759-/root/cache/go-build,target=/root/.cache/go-build go build -o out

#14 0.513 pkg/services/analyzedocumentservice/analyze_document_service.go:4:2: package cmp is not in GOROOT (/nix/store/a7875alzpnr46z6mv4ssymfdwmvr6xbq-go-1.19.4/share/go/src/cmp)
#14 0.513 pkg/api/middleware/user_allowlist.go:8:2: package slices is not in GOROOT (/nix/store/a7875alzpnr46z6mv4ssymfdwmvr6xbq-go-1.19.4/share/go/src/slices)

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?
19 replies