fix: prefer local repo build over stale cached frontend#43
fix: prefer local repo build over stale cached frontend#43Selene29 wants to merge 1 commit intorepowise-dev:mainfrom
Conversation
|
This is correct. The local build should always win over a potentially stale cache, and the old ordering was clearly backwards. One quick confirmation: is there any scenario where a pip-installed user has a local .next/standalone build on their machine? If not, this is purely a developer-mode fix with zero impact on pip users, and the cached fallback still works for them as before. Just want to confirm before merging. |
|
Correct. No impact on pip users. _find_local_web() walks up from file (which resolves to site-packages/ for pip installs) and cwd, looking for packages/web/package.json. Neither path will match unless you're in the repo checkout itself. So for pip users, _find_local_web() returns None and the cached download fallback works exactly as before. This only affects editable installs / running from source. That is at least my understanding :) |
_start_frontend() checked the cached download (~/.repowise/web/) before the local repo build. When a stale cache existed, it always served that version even though serve_command() had determined the local build was the correct one to use. Swap the priority so local builds are preferred, with the cached download as a fallback for pip-installed users.
bae21d2 to
50def7e
Compare
Summary
_start_frontend()checked the cached download (~/.repowise/web/) before the local repo build, so a stale cached version was always served even when a newer local build existedTest plan
repowise servefrom a repo checkout that has a local.next/standalonebuild~/.repowise/web/version)