-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[go] Go builder improvements #9576
Conversation
A kind request to merge this PR soon, so that I can proceed with my project. The issue, which this PR addresses, has blocked my project's deployment for the past 1½ months. /cc @EndangeredMassa @TooTallNate @styfle @cb1kenobi @Ethan-Arrowood |
@vedantmgoyal2009 FYI, you can already use this update in a Vercel deployment by setting environment variable |
This pull request fixes multiple issues related to the Go builder, including problems with version selection, module management, Apple Silicon builds, and Windows compatibility. |
This PR fixes a handful of Go builder issues all related to the selected Golang version being used to build the function:
go.mod
version ignored forvc build
andvc dev
, uses systemPATH
version onlyvc dev
fails ifgo.mod
does not exist.vercel/cache/golang
instead of a global shared dirvc dev
, doesn’t reuse go build code/common settingsgo.mod
set to 1.19 or 1.20, but 1.18 or older is installedvc build
builds wrong arch on Apple Silicon/arm64vc build
on Windows doesn't properly resolve "builds" invercel.json
due to posix separator issuevc build
on Windows fails withpackage <pkg/name> is not in GOROOT
due to posix separator issueactions/setup-go
from all test workflowsI added a test that tests the
go tidy
issue.