Skip to content

Migration to v1.4.3

From v1.4.2 to v1.4.3.

Runs the file-altering verify steps first:

  • Moves cargo fmt and rust-llm-tidy to the top of .llm/verify.{sh,ps1}.
  • Every later step now checks the formatted and tidied files, so a passing run leaves no unverified edits.

1. Reorder .llm/verify.sh

Remove the formatting and tidy steps from the end:

  echo "Docs..."
  run_cmd env RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --document-private-items --quiet

- echo "Formatting..."
- run_cmd cargo fmt --all --quiet
-
  echo "Publish dry-run..."
  run_cmd cargo publish --dry-run --allow-dirty --quiet --workspace

- echo "Tidy..."
- if command -v rust-llm-tidy >/dev/null 2>&1; then
-   run_cmd rust-llm-tidy
- else
-   echo "Skipping; rust-llm-tidy not installed. Install: cargo install rust-llm-tidy-cli"
- fi
-
  if [ "$EXIT_CODE" -eq 0 ]; then

Add them at the top, before the build:

    return 0
  }

+ echo "Formatting..."
+ run_cmd cargo fmt --all --quiet
+
+ echo "Tidy..."
+ if command -v rust-llm-tidy >/dev/null 2>&1; then
+   run_cmd rust-llm-tidy
+ else
+   echo "Skipping; rust-llm-tidy not installed. Install: cargo install rust-llm-tidy-cli"
+ fi
+
  echo "Building..."
  run_cmd cargo build --workspace --all-features --all-targets --quiet

2. Reorder .llm/verify.ps1

Remove the formatting and tidy steps from the end:

      Write-Host "Docs..."
      $env:RUSTDOCFLAGS = "-D warnings"
      try {
          Invoke-LoggedCommand "cargo" @("doc", "--workspace", "--all-features", "--no-deps", "--document-private-items", "--quiet")
      } finally {
          $env:RUSTDOCFLAGS = $originalRustdocFlags
      }

-     Write-Host "Formatting..."
-     Invoke-LoggedCommand "cargo" @("fmt", "--all", "--quiet")
-
      Write-Host "Publish dry-run..."
      Invoke-LoggedCommand "cargo" @("publish", "--dry-run", "--allow-dirty", "--quiet", "--workspace")

-     Write-Host "Tidy..."
-     if (Get-Command rust-llm-tidy -ErrorAction SilentlyContinue) {
-         Invoke-LoggedCommand "rust-llm-tidy" @()
-     } else {
-         Write-Host "Skipping; rust-llm-tidy not installed. Install: cargo install rust-llm-tidy-cli"
-     }
  } finally {

Add them at the top, before the build:

  try {
+     Write-Host "Formatting..."
+     Invoke-LoggedCommand "cargo" @("fmt", "--all", "--quiet")
+
+     Write-Host "Tidy..."
+     if (Get-Command rust-llm-tidy -ErrorAction SilentlyContinue) {
+         Invoke-LoggedCommand "rust-llm-tidy" @()
+     } else {
+         Write-Host "Skipping; rust-llm-tidy not installed. Install: cargo install rust-llm-tidy-cli"
+     }
+
      Write-Host "Building..."
      Invoke-LoggedCommand "cargo" @("build", "--workspace", "--all-features", "--all-targets", "--quiet")

3. Update the template version marker

-reloaded-templates-rust:1.4.2
+reloaded-templates-rust:1.4.3