Skip to content

fix(docs): correct go install instructions #3309

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

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Conversation

jdahm
Copy link
Contributor

@jdahm jdahm commented Apr 3, 2024

Go 1.21+ is required for recent versions of sqlc. This is because it uses components that require the 1.21 toolchain. Coincidentally 1.21 is also when forward compatibility was introduced.

You can test this

$ docker run -it --rm golang:1.19
% go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
...
pkg/mod/github.com/sqlc-dev/sqlc@latest/internal/bundler/upload.go:7:2: package log/slog is not in GOROOT (/usr/local/go/src/log/slog)
pkg/mod/github.com/sqlc-dev/sqlc@latest/internal/codegen/golang/opts/options.go:6:2: package maps is not in GOROOT (/usr/local/go/src/maps)

Go 1.21+ is required for recent versions of sqlc. This is because it uses components that require the 1.21 toolchain. Coincidentally 1.21 is also when forward compatibility was introduced.
Comment on lines -25 to -30
### Go < 1.17:

```
go get github.com/sqlc-dev/sqlc/cmd/sqlc
```

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this since it's irrelevant now that Go 1.21 is required for maps and slog.

@jdahm jdahm changed the title Correct go install instructions fix(docs): correct go install instructions Apr 3, 2024
@kyleconroy kyleconroy merged commit 8e29add into sqlc-dev:main Apr 4, 2024
lisitsky pushed a commit to lisitsky/sqlc that referenced this pull request Jun 21, 2024
Go 1.21+ is required for recent versions of sqlc. This is because it uses components that require the 1.21 toolchain. Coincidentally 1.21 is also when forward compatibility was introduced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants