From 0998d5337960b7e59070ba05aabd2567dfd4cffe Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Mon, 27 Apr 2026 00:21:41 -0400 Subject: [PATCH 1/2] release: 2.49.0 --- CHANGELOG.md | 113 ++++++++++++++++++++++++++++++++ Cargo.lock | 24 +++---- Cargo.toml | 18 ++--- README.md | 2 +- crates/squawk_github/src/app.rs | 2 +- flake.nix | 2 +- package.json | 2 +- squawk-vscode/package.json | 2 +- 8 files changed, 139 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb90e67e..e78139ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,119 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## v2.49.0 - 2026-04-27 + +### Added + +- ide: goto def for select into (#1086) + + ```sql + select 1 a into t; + -- ^ 2. dest + select a from t; + -- ^ 1. goto def src + ``` + + and + + ```sql + select 1 a into t; + -- ^ 2. dest + select a from t; + -- ^ 1. goto def src + ``` + +- ide: goto def with view & qualified column (#1081) + + ```sql + create view v as select 1 id, 2 b; + -- ^ 2. dest + select v.id from v; + -- ^ 1. goto def src + ``` + +- ide: goto def from graph_table to create property graph (#1077) + + ```sql + create property graph myshop vertex tables (t key (a) no properties); + -- ^ 2. dest + select 1 from graph_table (myshop + -- ^ 1. goto def src + match (n is t) + columns (1 as x)); + ``` + + +- fmt: more work towards full select and create table support (#1079) + + ```sql + -- before + create table t(a int,b text); + + -- after + create table t( + a int, + b text + ); + ``` + + ```sql + -- before + select array[[1,2],[3,4]]; + + -- after + select array[[1, 2], [3, 4]]; + ``` + +### Fixed + +- ide: fix shadowing cte column w/ `*` hover + func call syntax for cte & views (#1094) + + ```sql + -- shadowing + create table t(a int, b int); + with + t as ( + select 1 + ), + -- yy overrides y since there's only 1 column in the * + u(x, yy) as ( + select *, 2 y, 3 z from t + ) + select y from u; + -- ^ 1. goto def src - doesn't resolve because of override above + ``` + + + ```sql + -- function call syntax for cte column + with cte as (select 1 as a) + -- ^ 2. dest + select a(cte) from cte; + -- ^ 1. goto def src + ``` + + ```sql + -- function call syntax for view column + create view v as select 1 as a; + -- ^ 2. dest + select a(v) from v; + -- ^ 1. goto def src + ``` + +### Internal + +- ide/server/wasm: use salsa for binder caching (#1078) +- ide: cleanup goto def & find ref tests to prep for extension support (#1080) +- ide: split resolve into resolve/collect/ast_nav & dedupe code (#1085) +- ide: consolidate name helpers (#1090) +- ide: update return types in resolve_name_ref to use Location (#1089) +- ide: simplify hovering for names (#1088) +- ide: refactor hover & find refs to use goto_def (#1087) +- ide: refactor resolve and fix a couple edge cases (#1094) +- ide: refactor resolve to use name related functions (#1092) +- ide: refactor code actions into their own modules (#1091) + ## v2.48.0 - 2026-04-18 ### Added diff --git a/Cargo.lock b/Cargo.lock index bb57258b..9fd1e6e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2385,7 +2385,7 @@ dependencies = [ [[package]] name = "squawk" -version = "2.48.0" +version = "2.49.0" dependencies = [ "annotate-snippets", "anyhow", @@ -2415,7 +2415,7 @@ dependencies = [ [[package]] name = "squawk-fmt" -version = "2.48.0" +version = "2.49.0" dependencies = [ "anyhow", "camino", @@ -2431,7 +2431,7 @@ dependencies = [ [[package]] name = "squawk-github" -version = "2.48.0" +version = "2.49.0" dependencies = [ "jsonwebtoken", "log", @@ -2442,7 +2442,7 @@ dependencies = [ [[package]] name = "squawk-ide" -version = "2.48.0" +version = "2.49.0" dependencies = [ "annotate-snippets", "etcetera", @@ -2464,14 +2464,14 @@ dependencies = [ [[package]] name = "squawk-lexer" -version = "2.48.0" +version = "2.49.0" dependencies = [ "insta", ] [[package]] name = "squawk-linter" -version = "2.48.0" +version = "2.49.0" dependencies = [ "annotate-snippets", "enum-iterator", @@ -2486,7 +2486,7 @@ dependencies = [ [[package]] name = "squawk-parser" -version = "2.48.0" +version = "2.49.0" dependencies = [ "annotate-snippets", "camino", @@ -2499,7 +2499,7 @@ dependencies = [ [[package]] name = "squawk-server" -version = "2.48.0" +version = "2.49.0" dependencies = [ "anyhow", "crossbeam-channel", @@ -2525,7 +2525,7 @@ dependencies = [ [[package]] name = "squawk-syntax" -version = "2.48.0" +version = "2.49.0" dependencies = [ "annotate-snippets", "camino", @@ -2539,7 +2539,7 @@ dependencies = [ [[package]] name = "squawk-thread" -version = "2.48.0" +version = "2.49.0" dependencies = [ "crossbeam-channel", "crossbeam-utils", @@ -2551,7 +2551,7 @@ dependencies = [ [[package]] name = "squawk-wasm" -version = "2.48.0" +version = "2.49.0" dependencies = [ "console_error_panic_hook", "console_log", @@ -3427,7 +3427,7 @@ checksum = "32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547" [[package]] name = "xtask" -version = "2.48.0" +version = "2.49.0" dependencies = [ "anyhow", "camino", diff --git a/Cargo.toml b/Cargo.toml index b5276f6f..426a3607 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["crates/squawk"] resolver = "2" [workspace.package] -version = "2.48.0" +version = "2.49.0" edition = "2024" rust-version = "1.94" authors = ["Squawk Team & Contributors"] @@ -78,14 +78,14 @@ rustc-hash = "2.1.1" # local # we have to make the versions explicit otherwise `cargo publish` won't work -squawk-github = { path = "./crates/squawk_github", version = "2.48.0" } -squawk-ide = { path = "./crates/squawk_ide", version = "2.48.0" } -squawk-lexer = { path = "./crates/squawk_lexer", version = "2.48.0" } -squawk-parser = { path = "./crates/squawk_parser", version = "2.48.0" } -squawk-syntax = { path = "./crates/squawk_syntax", version = "2.48.0" } -squawk-linter = { path = "./crates/squawk_linter", version = "2.48.0" } -squawk-server = { path = "./crates/squawk_server", version = "2.48.0" } -squawk-thread = { path = "./crates/squawk_thread", version = "2.48.0" } +squawk-github = { path = "./crates/squawk_github", version = "2.49.0" } +squawk-ide = { path = "./crates/squawk_ide", version = "2.49.0" } +squawk-lexer = { path = "./crates/squawk_lexer", version = "2.49.0" } +squawk-parser = { path = "./crates/squawk_parser", version = "2.49.0" } +squawk-syntax = { path = "./crates/squawk_syntax", version = "2.49.0" } +squawk-linter = { path = "./crates/squawk_linter", version = "2.49.0" } +squawk-server = { path = "./crates/squawk_server", version = "2.49.0" } +squawk-thread = { path = "./crates/squawk_thread", version = "2.49.0" } [workspace.lints.clippy] collapsible_else_if = "allow" diff --git a/README.md b/README.md index cbee69b7..c3dc7711 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ to your project's `.pre-commit-config.yaml`: ```yaml repos: - repo: https://github.com/sbdchd/squawk - rev: 2.48.0 + rev: 2.49.0 hooks: - id: squawk files: path/to/postgres/migrations/written/in/sql diff --git a/crates/squawk_github/src/app.rs b/crates/squawk_github/src/app.rs index 135cb1c4..4dd7ea40 100644 --- a/crates/squawk_github/src/app.rs +++ b/crates/squawk_github/src/app.rs @@ -11,7 +11,7 @@ use serde_json::Value; use std::time::Duration; use std::time::{SystemTime, UNIX_EPOCH}; -pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.48.0"; +pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.49.0"; #[derive(Debug, Serialize)] struct CommentBody { diff --git a/flake.nix b/flake.nix index 04682711..cd8f99e7 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ { squawk = final.rustPlatform.buildRustPackage { pname = "squawk"; - version = "2.48.0"; + version = "2.49.0"; cargoLock = { lockFile = ./Cargo.lock; diff --git a/package.json b/package.json index a134fb59..f1ef6f92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "squawk-cli", - "version": "2.48.0", + "version": "2.49.0", "description": "linter for PostgreSQL, focused on migrations", "repository": "git@github.com:sbdchd/squawk.git", "author": "Squawk Team & Contributors", diff --git a/squawk-vscode/package.json b/squawk-vscode/package.json index 2019e053..a46390f6 100644 --- a/squawk-vscode/package.json +++ b/squawk-vscode/package.json @@ -12,7 +12,7 @@ "icon": "icon.png", "author": "Squawk Team & Contributors", "license": "(Apache-2.0 OR MIT)", - "version": "2.48.0", + "version": "2.49.0", "engines": { "vscode": "^1.101.0" }, From 182f34ee403547db55ea5e04acdd0b1d381941e8 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Mon, 27 Apr 2026 00:22:53 -0400 Subject: [PATCH 2/2] fix --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e78139ae..82a4b032 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,7 +49,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 columns (1 as x)); ``` - - fmt: more work towards full select and create table support (#1079) ```sql @@ -73,7 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- ide: fix shadowing cte column w/ `*` hover + func call syntax for cte & views (#1094) +- ide: fix shadowing cte column w/ `*` hover + func call syntax for cte & views (#1094) ```sql -- shadowing @@ -90,7 +89,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 -- ^ 1. goto def src - doesn't resolve because of override above ``` - ```sql -- function call syntax for cte column with cte as (select 1 as a)