From 7ddb660b0c7ef9e7202ddb8d14d9ddbd6b254f49 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 18 Mar 2026 07:37:53 -0700 Subject: [PATCH] revert: always rebuild frontend, override caching with _NEED_FRONTEND_BUILD=true (#4427) * revert: remove frontend build caching from setup scripts The mtime-based caching introduced in #4404/#4413 can incorrectly skip frontend builds -- e.g. after git pull when filesystem timestamps are not preserved, or after our Tailwind v4 discovery that the site-packages .gitignore must be hidden before vite build (which the cached path doesn't handle). Always rebuild the frontend on setup. The build takes ~15s and is safer than risking a stale dist/. * revert: disable frontend build caching, keep code commented out Caching disabled by always setting _NEED_FRONTEND_BUILD=true. The mtime-based logic is preserved in comments for future re-enabling. Reasons for disabling: - Git does not preserve file timestamps, so cached dist/ can appear newer than freshly checked-out source after a pull - Tailwind v4 requires hiding site-packages/.gitignore before vite build; the cache path bypasses this, producing broken CSS * revert: always rebuild frontend, remove mtime caching * revert: always rebuild frontend, override caching with _NEED_FRONTEND_BUILD=true --- studio/setup.ps1 | 1 + studio/setup.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/studio/setup.ps1 b/studio/setup.ps1 index 3930ad686e..c768c066af 100644 --- a/studio/setup.ps1 +++ b/studio/setup.ps1 @@ -855,6 +855,7 @@ if ($IsPipInstall) { Write-Host "[INFO] Frontend source changed since last build -- rebuilding..." -ForegroundColor Yellow } } +$NeedFrontendBuild = $true if ($NeedFrontendBuild -and -not $IsPipInstall) { Write-Host "" Write-Host "Building frontend..." -ForegroundColor Cyan diff --git a/studio/setup.sh b/studio/setup.sh index bc9b563be1..02c49afc15 100755 --- a/studio/setup.sh +++ b/studio/setup.sh @@ -59,6 +59,7 @@ if [ -d "$SCRIPT_DIR/frontend/dist" ]; then _NEED_FRONTEND_BUILD=false fi fi +_NEED_FRONTEND_BUILD=true if [ "$_NEED_FRONTEND_BUILD" = false ]; then echo "✅ Frontend already built and up to date -- skipping Node/npm check." else