Skip to content

Commit d08deab

Browse files
authored
release: 2.51.0 (#1121)
1 parent 71462ec commit d08deab

12 files changed

Lines changed: 301 additions & 101 deletions

File tree

CHANGELOG.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## v2.51.0 - 2026-05-06
11+
12+
### Added
13+
14+
- linter: add file-level override to disable `assume_in_transaction` (#996). Thanks @reteps!
15+
16+
When using `assume-in-transaction`, you can disable it on a per file basis using a comment:
17+
18+
```sql
19+
-- squawk-disable-assume-in-transaction
20+
```
21+
22+
- syntax: add validation for `select into` (#1116)
23+
24+
Warn about invalid usages, such as:
25+
- `select 4 a union select 5 a into t;`
26+
- `with t as (select 1 a into t) select * from t;`
27+
- `select * from t where a in (select 1 a into t);`
28+
29+
and more!
30+
31+
- parser: add empty statement to ast (#1111)
32+
33+
```sql
34+
;
35+
;
36+
;
37+
```
38+
39+
now gives:
40+
41+
```
42+
SOURCE_FILE@0..5
43+
EMPTY_STMT@0..1
44+
SEMICOLON@0..1 ";"
45+
WHITESPACE@1..2 "\n"
46+
EMPTY_STMT@2..3
47+
SEMICOLON@2..3 ";"
48+
WHITESPACE@3..4 "\n"
49+
EMPTY_STMT@4..5
50+
SEMICOLON@4..5 ";"
51+
```
52+
53+
- ide: code actions create table as <-> select into + parser fix (#1113)
54+
55+
Create table and select into are roughly interchangable, so this code action
56+
supports switching between.
57+
58+
- ide: show comments for types and columns (#1110)
59+
- ide: hover infer more types for columns (#1109, #1108)
60+
61+
### Changed
62+
63+
- parser: cleanup insert & create rule ast grammar to be more strict (#1112)
64+
65+
### Fixed
66+
67+
- vscode: fix text mate grammar for multiple stmts on a line (#1115)
68+
- ide: fix infer column name w/ column aliases and goto def (#1118)
69+
- ide: fix output column alias resolution in group by / order by (#1117)
70+
- ide: fix inherit/like resolution + cte fixes (#1107)
71+
1072
## v2.50.0 - 2026-05-01
1173

1274
### Added

Cargo.lock

Lines changed: 64 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "2.50.0"
6+
version = "2.51.0"
77
edition = "2024"
88
rust-version = "1.94"
99
authors = ["Squawk Team & Contributors"]
@@ -44,6 +44,7 @@ rowan = "0.15.15"
4444
salsa = "0.26.0"
4545
smol_str = "0.3.2"
4646
enum-iterator = "2.1.0"
47+
jiff = "0.2.24"
4748
itertools = "0.14.0"
4849
line-index = "0.1.2"
4950
lsp-server = "0.7.8"
@@ -78,14 +79,14 @@ rustc-hash = "2.1.1"
7879

7980
# local
8081
# we have to make the versions explicit otherwise `cargo publish` won't work
81-
squawk-github = { path = "./crates/squawk_github", version = "2.50.0" }
82-
squawk-ide = { path = "./crates/squawk_ide", version = "2.50.0" }
83-
squawk-lexer = { path = "./crates/squawk_lexer", version = "2.50.0" }
84-
squawk-parser = { path = "./crates/squawk_parser", version = "2.50.0" }
85-
squawk-syntax = { path = "./crates/squawk_syntax", version = "2.50.0" }
86-
squawk-linter = { path = "./crates/squawk_linter", version = "2.50.0" }
87-
squawk-server = { path = "./crates/squawk_server", version = "2.50.0" }
88-
squawk-thread = { path = "./crates/squawk_thread", version = "2.50.0" }
82+
squawk-github = { path = "./crates/squawk_github", version = "2.51.0" }
83+
squawk-ide = { path = "./crates/squawk_ide", version = "2.51.0" }
84+
squawk-lexer = { path = "./crates/squawk_lexer", version = "2.51.0" }
85+
squawk-parser = { path = "./crates/squawk_parser", version = "2.51.0" }
86+
squawk-syntax = { path = "./crates/squawk_syntax", version = "2.51.0" }
87+
squawk-linter = { path = "./crates/squawk_linter", version = "2.51.0" }
88+
squawk-server = { path = "./crates/squawk_server", version = "2.51.0" }
89+
squawk-thread = { path = "./crates/squawk_thread", version = "2.51.0" }
8990

9091
[workspace.lints.clippy]
9192
collapsible_else_if = "allow"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ to your project's `.pre-commit-config.yaml`:
265265
```yaml
266266
repos:
267267
- repo: https://github.com/sbdchd/squawk
268-
rev: 2.50.0
268+
rev: 2.51.0
269269
hooks:
270270
- id: squawk
271271
files: path/to/postgres/migrations/written/in/sql

crates/squawk_github/src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use serde_json::Value;
1111
use std::time::Duration;
1212
use std::time::{SystemTime, UNIX_EPOCH};
1313

14-
pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.50.0";
14+
pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.51.0";
1515

1616
#[derive(Debug, Serialize)]
1717
struct CommentBody {

crates/xtask/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ anyhow.workspace = true
1313
csv.workspace = true
1414
clap.workspace = true
1515
enum-iterator.workspace = true
16+
jiff.workspace = true
17+
toml.workspace = true
1618
serde.workspace = true
1719
serde_json.workspace = true
1820
convert_case.workspace = true

crates/xtask/src/main.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,28 @@ use codegen::codegen;
55
use new_rule::new_lint;
66
use sync_builtins::sync_builtins;
77
use sync_pg::sync_pg;
8+
use update_version::{UpdateVersionArgs, update_version};
89

910
mod codegen;
1011
mod keywords;
1112
mod new_rule;
1213
mod path;
1314
mod sync_builtins;
1415
mod sync_pg;
16+
mod update_version;
1517

1618
#[derive(Subcommand, Debug)]
1719
enum TaskName {
1820
#[command(long_about = "Generate code for AST, SyntaxKind, and TokenSets")]
1921
Codegen,
2022
#[command(long_about = "Create a new linter rule")]
2123
NewRule(NewRuleArgs),
22-
#[command(long_about = "Fetch the latest kwlist.h and regression suite from Postgres")]
23-
SyncPg,
2424
#[command(long_about = "Generate builtins.sql from PostgreSQL pg_type catalog")]
2525
SyncBuiltins,
26+
#[command(long_about = "Fetch the latest kwlist.h and regression suite from Postgres")]
27+
SyncPg,
28+
#[command(long_about = "Bump the squawk version across all version-bearing files")]
29+
UpdateVersion(UpdateVersionArgs),
2630
}
2731

2832
#[derive(Args, Debug)]
@@ -42,9 +46,10 @@ struct Arguments {
4246
fn main() -> Result<()> {
4347
let args = Arguments::parse();
4448
match args.task {
45-
TaskName::SyncPg => sync_pg(),
46-
TaskName::NewRule(args) => new_lint(args),
4749
TaskName::Codegen => codegen(),
50+
TaskName::NewRule(args) => new_lint(args),
4851
TaskName::SyncBuiltins => sync_builtins(),
52+
TaskName::SyncPg => sync_pg(),
53+
TaskName::UpdateVersion(args) => update_version(args),
4954
}
5055
}

0 commit comments

Comments
 (0)