From 3279c79ab41b03b78104bff72403ebf6e1898831 Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Mon, 29 Sep 2025 16:47:54 +0200 Subject: [PATCH 1/2] chore: update Rust to 1.90.0 Update Rust and fix clippy warnings. --- psl/parser-database/src/coerce_expression.rs | 4 ++-- rust-toolchain.toml | 2 +- schema-engine/connectors/schema-connector/src/error.rs | 2 +- schema-engine/sql-schema-describer/src/postgres.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/psl/parser-database/src/coerce_expression.rs b/psl/parser-database/src/coerce_expression.rs index ee2b2f1d06aa..16bde01d2cf3 100644 --- a/psl/parser-database/src/coerce_expression.rs +++ b/psl/parser-database/src/coerce_expression.rs @@ -88,7 +88,7 @@ pub mod coerce_opt { const fn coerce<'a, T>( coercion: impl Fn(&'a ast::Expression) -> Option, expected_type: &'static str, -) -> impl (Fn(&'a ast::Expression, &mut Diagnostics) -> Option) { +) -> impl Fn(&'a ast::Expression, &mut Diagnostics) -> Option { move |expr, diagnostics| match coercion(expr) { Some(t) => Some(t), None => { @@ -106,7 +106,7 @@ const fn coerce<'a, T>( /// Coerce an expression to an array. The coercion function is used to coerce the array elements. pub fn coerce_array<'a, T>( expr: &'a ast::Expression, - coercion: &dyn (Fn(&'a ast::Expression, &mut Diagnostics) -> Option), + coercion: &dyn Fn(&'a ast::Expression, &mut Diagnostics) -> Option, diagnostics: &mut Diagnostics, ) -> Option> { let mut out = Vec::new(); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 62e2305befb7..304199d54340 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.89.0" +channel = "1.90.0" components = ["clippy", "rustfmt", "rust-src"] targets = [ # WASM target for serverless and edge environments. diff --git a/schema-engine/connectors/schema-connector/src/error.rs b/schema-engine/connectors/schema-connector/src/error.rs index 66006ab6b70f..3f08b6147425 100644 --- a/schema-engine/connectors/schema-connector/src/error.rs +++ b/schema-engine/connectors/schema-connector/src/error.rs @@ -28,7 +28,7 @@ struct ConnectorErrorImpl { /// Additional context. message: Option>, /// The source of the error. - source: Option>, + source: Option>, /// See the tracing-error docs. context: SpanTrace, } diff --git a/schema-engine/sql-schema-describer/src/postgres.rs b/schema-engine/sql-schema-describer/src/postgres.rs index d03f9aa019ae..653116fe2047 100644 --- a/schema-engine/sql-schema-describer/src/postgres.rs +++ b/schema-engine/sql-schema-describer/src/postgres.rs @@ -653,7 +653,7 @@ impl<'a> SqlSchemaDescriber<'a> { let rows = self.conn.query_raw(sql, &[Value::array(namespaces)]).await?; - let names = rows.into_iter().map(|row| (row.get_expect_string("namespace_name"))); + let names = rows.into_iter().map(|row| row.get_expect_string("namespace_name")); for namespace in names { sql_schema.push_namespace(namespace); From 484ebf66acd1b0bcb1adb6f9d5f121f9d379b1c1 Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Mon, 29 Sep 2025 17:00:00 +0200 Subject: [PATCH 2/2] chore: update nightly toolchain for query-engine-wasm Update the Rust toolchain for query-engine-wasm to `nightly-2025-09-29`. Update the cargo and compiler flags in `build.sh` to use the new panic strategy introduced in . --- query-engine/query-engine-wasm/build.sh | 6 ++++-- query-engine/query-engine-wasm/rust-toolchain.toml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/query-engine/query-engine-wasm/build.sh b/query-engine/query-engine-wasm/build.sh index 03c15639cbef..8342c02a8f6c 100755 --- a/query-engine/query-engine-wasm/build.sh +++ b/query-engine/query-engine-wasm/build.sh @@ -58,12 +58,14 @@ build() { local CARGO_TARGET_DIR CARGO_TARGET_DIR=$(cargo metadata --format-version 1 | jq -r .target_directory) echo "🔨 Building $CONNECTOR" - RUSTFLAGS="-Zlocation-detail=none" CARGO_PROFILE_RELEASE_OPT_LEVEL="z" cargo build \ + RUSTFLAGS="-Zlocation-detail=none -Zunstable-options -Cpanic=immediate-abort" \ + CARGO_PROFILE_RELEASE_OPT_LEVEL="z" \ + cargo build \ -p query-engine-wasm \ --profile "$WASM_BUILD_PROFILE" \ --features "$CONNECTOR" \ --target wasm32-unknown-unknown \ - -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + -Zbuild-std=std,panic_abort local IN_FILE="$CARGO_TARGET_DIR/wasm32-unknown-unknown/$WASM_TARGET_SUBDIR/query_engine_wasm.wasm" local OUT_FILE="$OUT_FOLDER/$PROVIDER/query_engine_bg.wasm" diff --git a/query-engine/query-engine-wasm/rust-toolchain.toml b/query-engine/query-engine-wasm/rust-toolchain.toml index c1ce0875fffe..f21b079b89db 100644 --- a/query-engine/query-engine-wasm/rust-toolchain.toml +++ b/query-engine/query-engine-wasm/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2025-06-27" +channel = "nightly-2025-09-29" components = ["clippy", "rustfmt", "rust-src"] targets = ["wasm32-unknown-unknown"]