Merge pull request #223166 from marsam/update-squawk

squawk: 0.21.0 -> 0.22.0
This commit is contained in:
Nick Cao 2023-03-26 10:26:08 +08:00 committed by GitHub
commit 94c53c2742
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 51 deletions

View file

@ -1,13 +0,0 @@
diff --git a/Cargo.lock b/Cargo.lock
index d5803a8..384224d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1585,7 +1585,7 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]]
name = "squawk"
-version = "0.20.0"
+version = "0.21.0"
dependencies = [
"atty",
"base64 0.12.3",

View file

@ -8,39 +8,19 @@
, rustPlatform
, stdenv
}:
let
# The query parser produces a slightly different AST between major versions
# and Squawk is not capable of handling >=14 correctly yet.
libpg_query13 = libpg_query.overrideAttrs (_: rec {
version = "13-2.2.0";
src = fetchFromGitHub {
owner = "pganalyze";
repo = "libpg_query";
rev = version;
hash = "sha256-gEkcv/j8ySUYmM9lx1hRF/SmuQMYVHwZAIYOaCQWAFs=";
};
});
in
rustPlatform.buildRustPackage rec {
pname = "squawk";
version = "0.21.0";
version = "0.22.0";
src = fetchFromGitHub {
owner = "sbdchd";
repo = pname;
rev = "v${version}";
hash = "sha256-ObaYGGTAGGLOAji86Q5R9fqbCGg6GP0A3iheNLgzezY=";
hash = "sha256-nJOeGZFeMfjqtuZID325bKKsKzVwAYTKeGPEVi2oy3s=";
};
cargoHash = "sha256-VOGgwBKcJK7x+PwvzvuVu9Zd1G8t9UoC/Me3G6bdtrk=";
cargoPatches = [
./correct-Cargo.lock.patch
];
patches = [
./fix-postgresql-version-in-snapshot-test.patch
];
cargoHash = "sha256-CupmmfLqoBm+rK/mLEjfCWSNS2LCRKWIETBek0nUcv8=";
nativeBuildInputs = [
pkg-config
@ -57,7 +37,7 @@ rustPlatform.buildRustPackage rec {
OPENSSL_NO_VENDOR = 1;
LIBPG_QUERY_PATH = libpg_query13;
LIBPG_QUERY_PATH = libpg_query;
meta = with lib; {
description = "Linter for PostgreSQL, focused on migrations";

View file

@ -1,13 +0,0 @@
diff --git a/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap b/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap
index 7273b74..ae94927 100644
--- a/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap
+++ b/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap
@@ -133,7 +133,7 @@ Ok(
}),
]),
"version": Number(
- 130003,
+ 130008,
),
}),
)