diff --git a/prqlc/prqlc/src/main.rs b/prqlc/prqlc/src/main.rs index c24f13d690a9..a26c6a8a31f4 100644 --- a/prqlc/prqlc/src/main.rs +++ b/prqlc/prqlc/src/main.rs @@ -3,7 +3,17 @@ mod cli; #[cfg(all(not(target_family = "wasm"), feature = "cli"))] fn main() -> color_eyre::eyre::Result<()> { - cli::main() + // Use a larger stack size (8 MiB) to avoid stack overflows on Windows, + // where the default stack is only 1 MiB. + const STACK_SIZE: usize = 8 * 1024 * 1024; + + let thread = std::thread::Builder::new() + .stack_size(STACK_SIZE) + .spawn(cli::main) + .expect("failed to spawn main thread"); + + thread.join().expect("main thread panicked")?; + Ok(()) } #[cfg(any(target_family = "wasm", not(feature = "cli")))] diff --git a/prqlc/prqlc/src/semantic/resolver/transforms.rs b/prqlc/prqlc/src/semantic/resolver/transforms.rs index a8401851e82b..c6a66aa62bb0 100644 --- a/prqlc/prqlc/src/semantic/resolver/transforms.rs +++ b/prqlc/prqlc/src/semantic/resolver/transforms.rs @@ -954,9 +954,8 @@ impl Lineage { // special case: an ref that should be inlined because this node // might not exist in the resulting AST - if inline_refs && expr.target_id.is_some() { + if let Some(target_id) = expr.target_id.filter(|_| inline_refs) { let ident = expr.kind.as_ident().unwrap().clone().pop_front().1.unwrap(); - let target_id = expr.target_id.unwrap(); let input = &self.find_input(target_id); self.columns.push(if input.is_some() { @@ -973,7 +972,7 @@ impl Lineage { } }); return; - }; + } // base case: define the expr as a new lineage column let (target_id, target_name) = (expr.id.unwrap(), None); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 9be608827e12..ffe91cca19a2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,6 +1,6 @@ [toolchain] # Generally run 1 behind latest -channel = "1.92.0" +channel = "1.93.1" components = ["rustfmt", "clippy"] # We want two targets: wasm32, and the default target for the platform, which we # don't list here. (i.e. we use each platform to test each platform)