Skip to content

Commit 41cfe9d

Browse files
committed
Merge branch 'main' into fix-embed-naming
2 parents be1a27f + a4fa8b9 commit 41cfe9d

File tree

2,933 files changed

+6789
-8478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,933 files changed

+6789
-8478
lines changed

.github/ISSUE_TEMPLATE/BUG_REPORT.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ body:
99
description: What version of sqlc are you running? If you don't know, run `sqlc version`.
1010
multiple: false
1111
options:
12+
- 1.24.0
1213
- 1.23.0
1314
- 1.22.0
1415
- 1.21.0

.github/workflows/ci-kotlin.yml

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,22 @@ on:
55
- main
66
pull_request:
77
jobs:
8-
98
build:
109
name: test
1110
runs-on: ubuntu-latest
12-
13-
services:
14-
postgres:
15-
image: postgres:11
16-
env:
17-
POSTGRES_USER: postgres
18-
POSTGRES_PASSWORD: postgres
19-
POSTGRES_DB: postgres
20-
ports:
21-
- 5432:5432
22-
# needed because the postgres container does not provide a healthcheck
23-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
24-
mysql:
25-
image: mysql:8
26-
env:
27-
MYSQL_ROOT_PASSWORD: mysecretpassword
28-
MYSQL_DATABASE: mysql
29-
ports:
30-
- 3306:3306
31-
3211
steps:
3312
- uses: actions/checkout@v4
34-
- uses: actions/setup-java@v3
13+
- uses: actions/setup-go@v5
3514
with:
36-
distribution: 'adopt'
37-
java-version: '11'
38-
- uses: eskatos/gradle-command-action@v2
39-
env:
40-
PG_USER: postgres
41-
PG_HOST: localhost
42-
PG_DATABASE: postgres
43-
PG_PASSWORD: postgres
44-
PG_PORT: ${{ job.services.postgres.ports['5432'] }}
45-
MYSQL_DATABASE: mysql
46-
MYSQL_HOST: localhost
47-
MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }}
48-
MYSQL_ROOT_PASSWORD: mysecretpassword
15+
go-version: '1.21.3'
16+
- name: install ./...
17+
run: go install ./...
18+
- uses: actions/checkout@v4
4919
with:
50-
build-root-directory: examples/kotlin
51-
wrapper-directory: examples/kotlin
52-
arguments: test --scan
20+
repository: sqlc-dev/sqlc-gen-kotlin
21+
path: kotlin
22+
- run: make test
23+
working-directory: kotlin
24+
- run: sqlc diff
25+
working-directory: kotlin/examples
26+

.github/workflows/ci-python.yml

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,21 @@ on:
55
- main
66
pull_request:
77
jobs:
8-
98
build:
109
name: test
1110
runs-on: ubuntu-latest
12-
13-
services:
14-
postgres:
15-
image: postgres:11
16-
env:
17-
POSTGRES_USER: postgres
18-
POSTGRES_PASSWORD: postgres
19-
POSTGRES_DB: postgres
20-
ports:
21-
- 5432:5432
22-
# needed because the postgres container does not provide a healthcheck
23-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
24-
2511
steps:
2612
- uses: actions/checkout@v4
27-
- uses: actions/setup-python@v4
13+
- uses: actions/setup-go@v5
2814
with:
29-
python-version: 3.9
30-
- name: Install python dependencies
31-
working-directory: ./examples/python
32-
run: |
33-
python -m pip install --upgrade pip
34-
python -m pip install -r requirements.txt
35-
- name: Test python code
36-
working-directory: ./examples/python
37-
env:
38-
PG_USER: postgres
39-
PG_HOST: localhost
40-
PG_DATABASE: postgres
41-
PG_PASSWORD: postgres
42-
PG_PORT: ${{ job.services.postgres.ports['5432'] }}
43-
run: |
44-
pytest src/tests
15+
go-version: '1.21.3'
16+
- name: install ./...
17+
run: go install ./...
18+
- uses: actions/checkout@v4
19+
with:
20+
repository: sqlc-dev/sqlc-gen-python
21+
path: python
22+
- run: make test
23+
working-directory: python
24+
- run: sqlc diff
25+
working-directory: python/examples

.github/workflows/ci-typescript.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: typescript
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
jobs:
8+
build:
9+
name: test
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-go@v5
14+
with:
15+
go-version: '1.21.3'
16+
- name: install ./...
17+
run: go install ./...
18+
- uses: actions/checkout@v4
19+
with:
20+
repository: sqlc-dev/sqlc-gen-typescript
21+
path: typescript
22+
- run: sqlc diff
23+
working-directory: typescript/examples

.github/workflows/ci.yml

Lines changed: 30 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,32 @@ on:
55
- main
66
pull_request:
77
jobs:
8-
windows-build:
9-
if: ${{ github.ref == 'refs/heads/main' }}
10-
runs-on: windows-latest
11-
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-go@v4
14-
with:
15-
go-version: '1.21.3'
16-
- run: go build ./...
17-
18-
darwin-build:
19-
if: ${{ github.ref == 'refs/heads/main' }}
20-
runs-on: macos-latest
21-
steps:
22-
- uses: actions/checkout@v4
23-
- uses: actions/setup-go@v4
24-
with:
25-
go-version: '1.21.3'
26-
- run: go build ./...
27-
28-
build:
29-
name: test
30-
runs-on: ubuntu-latest
31-
32-
services:
33-
mysql:
34-
image: "mysql/mysql-server:8.0"
35-
env:
36-
MYSQL_DATABASE: mysql
37-
MYSQL_ROOT_HOST: '%'
38-
MYSQL_ROOT_PASSWORD: mysecretpassword
39-
ports:
40-
- 3306:3306
8+
test:
9+
strategy:
10+
max-parallel: 2
11+
matrix:
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
cgo: ['1', '0']
14+
# Workaround no native support for conditional matrix items
15+
# https://github.com/orgs/community/discussions/26253#discussioncomment-6745038
16+
isMain:
17+
- ${{ github.ref == 'refs/heads/main' }}
18+
exclude:
19+
- isMain: false
20+
include:
21+
- os: ubuntu-latest
22+
cgo: '1'
23+
- os: ubuntu-latest
24+
cgo: '0'
25+
name: test ${{ matrix.os }} cgo=${{ matrix.cgo }}
26+
runs-on: ${{ matrix.os }}
4127

4228
steps:
4329
- uses: actions/checkout@v4
44-
- uses: actions/setup-go@v4
30+
- uses: actions/setup-go@v5
4531
with:
46-
go-version: '1.21.3'
32+
go-version-file: go.mod
33+
check-latest: true
4734

4835
- name: install gotestsum
4936
run: go install gotest.tools/gotestsum@latest
@@ -53,30 +40,32 @@ jobs:
5340

5441
- name: install ./...
5542
run: go install ./...
43+
env:
44+
CGO_ENABLED: ${{ matrix.cgo }}
5645

5746
- name: build internal/endtoend
5847
run: go build ./...
5948
working-directory: internal/endtoend/testdata
49+
env:
50+
CGO_ENABLED: ${{ matrix.cgo }}
6051

6152
- name: test ./...
6253
run: gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m ./...
6354
env:
64-
MYSQL_DATABASE: mysql
65-
MYSQL_HOST: localhost
66-
MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }}
67-
MYSQL_ROOT_PASSWORD: mysecretpassword
6855
CI_SQLC_PROJECT_ID: ${{ secrets.CI_SQLC_PROJECT_ID }}
6956
CI_SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }}
7057
SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }}
58+
CGO_ENABLED: ${{ matrix.cgo }}
7159

7260
vuln_check:
7361
runs-on: ubuntu-latest
7462
timeout-minutes: 5
7563

7664
steps:
7765
- uses: actions/checkout@v4
78-
- uses: actions/setup-go@v4
66+
- uses: actions/setup-go@v5
7967
with:
80-
go-version: '1.21.3'
68+
go-version-file: go.mod
69+
check-latest: true
8170
- run: go install golang.org/x/vuln/cmd/govulncheck@latest
8271
- run: govulncheck ./...

.github/workflows/gen.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ jobs:
1818
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
1919
steps:
2020
- uses: actions/checkout@v4
21-
- uses: actions/setup-go@v4
21+
- uses: actions/setup-go@v5
2222
with:
23-
go-version: '1.21.3'
23+
go-version-file: go.mod
24+
check-latest: true
2425
- run: go build -o sqlc-pg-gen ./internal/tools/sqlc-pg-gen
2526
- run: mkdir -p gen/contrib
2627
- run: ./sqlc-pg-gen gen
@@ -31,7 +32,7 @@ jobs:
3132
PG_PASSWORD: postgres
3233
PG_PORT: ${{ job.services.postgres.ports['5432'] }}
3334
- name: Save results
34-
uses: actions/upload-artifact@v3
35+
uses: actions/upload-artifact@v4
3536
with:
3637
name: sqlc-pg-gen-results
3738
path: gen

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# STEP 1: Build sqlc
2-
FROM golang:1.21.3 AS builder
2+
FROM golang:1.21.5 AS builder
33

44
COPY . /workspace
55
WORKDIR /workspace

buf.gen.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
version: v1
22
managed:
33
enabled: true
4+
go_package_prefix:
5+
default: "github.com/sqlc-dev/sqlc/internal"
46
plugins:
57
- plugin: buf.build/protocolbuffers/go:v1.30.0
68
out: internal

buf.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/_templates/breadcrumbs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% block breadcrumbs %}
44
{% if show_banner %}
55
<header id="banner">
6-
<div>Query analysis, now <a href="https://sqlc.dev/posts/2023/10/24/sqlc-v1-23-0-database-backed-analyzer/">powered by PostgreSQL</a>.</div>
6+
<div>Introducing <a href="https://sqlc.dev/posts/2023/12/04/preview-typescript-support-with-sqlc-gen-typescript/">sqlc-gen-typescript</a>: Generate TypeScript from SQL.</div>
77
</header>
88
{% endif %}
99
{{ super() }}

docs/conf.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Riza, Inc.'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '1.23.0'
25+
release = '1.24.0'
2626

2727

2828
# -- General configuration ---------------------------------------------------
@@ -33,7 +33,8 @@
3333
extensions = [
3434
'myst_parser',
3535
'sphinx_rtd_theme',
36-
"sphinx_favicon",
36+
'sphinx_favicon',
37+
'sphinxext.rediraffe',
3738
]
3839

3940
# Add any paths that contain templates here, relative to this directory.
@@ -75,4 +76,8 @@ def setup(app):
7576
myst_enable_extensions = [
7677
"attrs_inline",
7778
"colon_fence",
78-
]
79+
]
80+
81+
rediraffe_redirects = {
82+
"howto/upload.md": "howto/push.md",
83+
}

0 commit comments

Comments
 (0)