From 074f84c556c93bdbef90729c5ebc75cd0fd9430e Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 25 Sep 2025 14:48:50 -0700 Subject: [PATCH 1/3] Explicitly install clippy --- build.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build.ps1 b/build.ps1 index d681bf94c..00344da95 100755 --- a/build.ps1 +++ b/build.ps1 @@ -323,6 +323,18 @@ if (!$SkipBuild) { & $rustup target add --toolchain $channel $architecture } + if ($Clippy -and $null -eq (Get-Command cargo-clippy -ErrorAction Ignore)) { + Write-Verbose -Verbose "clippy not found, installing..." + if ($UseCFS) { + cargo install clippy --config .cargo/config.toml + } else { + rustup component add clippy + } + if ($LASTEXITCODE -ne 0) { + throw "Failed to install clippy" + } + } + if (Test-Path $target) { Remove-Item $target -Recurse -ErrorAction Ignore } From eb0beda7c2c8bf1a28883e675c23990a89e28913 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 25 Sep 2025 15:14:55 -0700 Subject: [PATCH 2/3] change location of detecting clippy --- build.ps1 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/build.ps1 b/build.ps1 index 00344da95..0ace2dcf6 100755 --- a/build.ps1 +++ b/build.ps1 @@ -236,6 +236,18 @@ if ($null -ne $packageType) { & $rustup default stable } + if ($Clippy -and $null -eq (Get-Command cargo-clippy -ErrorAction Ignore)) { + Write-Verbose -Verbose "clippy not found, installing..." + if ($UseCFS) { + cargo install clippy --config .cargo/config.toml + } else { + cargo install clippy + } + if ($LASTEXITCODE -ne 0) { + throw "Failed to install clippy" + } + } + ## Test if Node is installed ## Skipping upgrade as users may have a specific version they want to use if (!(Get-Command 'node' -ErrorAction Ignore)) { @@ -323,18 +335,6 @@ if (!$SkipBuild) { & $rustup target add --toolchain $channel $architecture } - if ($Clippy -and $null -eq (Get-Command cargo-clippy -ErrorAction Ignore)) { - Write-Verbose -Verbose "clippy not found, installing..." - if ($UseCFS) { - cargo install clippy --config .cargo/config.toml - } else { - rustup component add clippy - } - if ($LASTEXITCODE -ne 0) { - throw "Failed to install clippy" - } - } - if (Test-Path $target) { Remove-Item $target -Recurse -ErrorAction Ignore } From ebe1bb963aaf9992bf6e47c20e5f0e58a6b00057 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 25 Sep 2025 15:23:56 -0700 Subject: [PATCH 3/3] specify architecture --- build.ps1 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build.ps1 b/build.ps1 index 0ace2dcf6..6c238faed 100755 --- a/build.ps1 +++ b/build.ps1 @@ -236,12 +236,18 @@ if ($null -ne $packageType) { & $rustup default stable } - if ($Clippy -and $null -eq (Get-Command cargo-clippy -ErrorAction Ignore)) { - Write-Verbose -Verbose "clippy not found, installing..." + if ($Clippy) { + Write-Verbose -Verbose "Installing clippy..." if ($UseCFS) { cargo install clippy --config .cargo/config.toml } else { - cargo install clippy + if ($architecture -ne 'current') { + write-verbose -verbose "Installing clippy for $architecture" + & $rustup component add clippy --target $architecture + } else { + write-verbose -verbose "Installing clippy for current architecture" + & $rustup component add clippy + } } if ($LASTEXITCODE -ne 0) { throw "Failed to install clippy"