Repository navigation
Build Makepad's catalog apps in the checkout, shared by every home - #551
Merged
Merged
Conversation
The six "source": "makepad" catalog apps (browser, files, finance, route, image, pdf) built into <OctoSense home>/build/makepad, so every new home (each test or demo profile) compiled all six again, minutes each on a busy Mac, and kept its own 1.5-2 GB copy. They now build in the checkout's own target dir, target/makepad ($CARGO_TARGET_DIR/makepad when set), beside the native apps, which every home already shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The six
"source": "makepad"catalog apps (browser, files, finance, route, image, pdf) now build in the checkout's own target dir,target/makepad($CARGO_TARGET_DIR/makepadwhen set), beside the native apps. Before, they built into the OctoSense home'sbuild/makepad, so each home started cold.Why
From a checkout, an app's first open waits for its release build (#549 moves those builds to the background). The native apps were already shared: they build in
<checkout>/targetwhichever OctoSense home the shell runs with. The six Makepad apps built under<OCTOSENSE_HOME>/build/makepadinstead, so every new home compiled all six from scratch. That includes the empty test home AGENTS.md asks for in local shell tests, and every demo profile.Each cold build takes minutes on a busy Mac. On 19 Oct, first opens on a demo profile took 11.8 min for route, 9.4 min for finance, 6.4 min for browser and 3.6 min for pdf. They also build four variants of
makepad-widgets(default,cef,pdf,maps+voice). Each home also kept its own 1.5–2 GB copy. On this Mac,~/.octosense/build/makepadholds 2.0 GB, untouched since 7 Oct, with 11 builds ofmakepad-widgets. A home's copy also served every checkout run with it, so switching between checkouts on different Makepad trees rebuilt the shared folder each time.What changes
catalog.rs: a Makepad row'starget_dirismakepad_target_dir(). That is the target dir of the workspace aroundpaths::project_root(), the same onelaunch_plangives native apps (clients::workspace_target_dir, now shared), plusmakepad/. With no checkout, it falls back to the home'sbuild/makepad. That can't happen while a Makepad row resolves, becausemakepad_root()needs the same project root.clients.rs:workspace_target_dir()factored out of the native branch oflaunch_plan. The new testmakepad_launches_share_the_checkouts_build_with_every_homechecks three things: a Makepad row's build dir is the native apps' target dir plusmakepad; it is not under the OctoSense home; and it is the--target-dircargo gets.sandbox/tests.rs: a comment no longer says the desktop builds into the home. The test still covers a program inside the home.desktop/README.md,README.zh-CN.md: where these builds go now. Also says the old~/.octosense/build/makepadis no longer used and can be deleted. The shell deletes nothing itself, because older checkouts still build there.Sandboxing is unchanged. Makepad rows are not native apps and get no sandbox policy. A native app's sandbox already holds its build's target dir read-only, and
target/makepadsits inside that dir.Testing
phone/:cargo test --locked --features mobile-apps -p octosense-shell --lib -- clients::tests octosense::catalog::tests prebuild::tests sandbox::tests: 71 passed, including the new test.tools/ci-local.sh --only all --linux-host --offload): to follow on this head.OCTOSENSE_HOMEshould log the six Makepad apps' prebuild steps in seconds, where before each compiled from scratch. I'll run it once the maintainer's demo window closes, because only one shell runs on the machine at a time, and report it here.🤖 Generated with Claude Code