Repository navigation
Conversation
…ate cargo build-dir scripts/run-branch.sh builds and serves any branch in its own worktree and target dir (optionally behind a cloudflared https tunnel for phones and tablets). build.rs now decides whether to rebuild the frontend from a content hash instead of mtimes, so a fresh checkout or branch switch with identical sources no longer pays minutes for a rebuild, and prints a line on the terminal before the silent step. The wasm-pack cargo gets a private CARGO_BUILD_BUILD_DIR: a global build-dir is shared by every cargo and one running cargo run made every other build block silently at 0% CPU.
Member
Author
|
Trekmeester review: one bug before this can be batched. The content-hash stamp lives at |
This was referenced Oct 1, 2026
joepio
added a commit
that referenced
this pull request
Oct 6, 2026
One tested commit for the open PRs of 5 October: link device to account (#1948), one profile form (#1953), faster branch runs (#1956), end-to-end encrypted conversations (#1971), passkey ceremony header (#1972), Flutter account package (#2035), cheap canvas undo (#2053), atomic.place tab title (#2056), table resource cell (#2057), small table fixes (#2058), storage map (#2061), Sync page cloud ladder (#2072), several served-domain suffixes (#2073), one sign-in (#2074), smaller chat messages (#2077), bring-along e2e fix (#2078), inline row data loss (#2079), Retry-After (#2080), #2070, #2071, #2066, #2067, #2068, #1969, #1887, #1897 and #1920. Compressed stored values from #2077 stay readable, but a downgrade cannot read compressed rows. Co-authored-by: Joep Meindertsma <joep@ontola.io>
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.
Requested by Joep
Before: Checking out a branch and getting it running took about 280s cold, and
cargo runcould sit atBuilding 1084/1087: atomic-server(build)for 15+ minutes at 0% CPU. A fresh checkout gave every file a new mtime, so build.rs rebuilt the frontend and WASM even when the sources were identical, and the work was silent. Phones and tablets on the LAN failed with "This browser could not open local storage".After:
scripts/run-branch.sh <branch> [--tunnel]builds and serves a branch in its own worktree and target dir, printing a line per phase, and--tunnelgives an https URL for other devices. build.rs decides on a content hash, so identical sources skip the frontend build, and it prints a line on the terminal before the silent step.The hang was not a slow build: a global
build-dirin~/.cargo/config.tomlis shared by every repo and has one lock, so a runningcargo runblocked every other cargo, including the one insidewasm-pack. The script andbuild:wasmnow use a privateCARGO_BUILD_BUILD_DIR. AGENTS.md documents this, the secure-origin rule (the server derives its login origin fromATOMIC_DOMAIN, and tunnelto breaks the websocket), and the worktree approach.How: changes are in
scripts/run-branch.sh,server/build.rs,browser/data-browser/package.json,AGENTS.md,.gitignore.Measured on this Mac: cold checkout to 200 was 280s before (pnpm 1s, frontend+WASM 90s, cargo 177s, start 12s) and 264s with run-branch.sh on the canvas branch. Re-running on the same branch is about 32s to a 200 (frontend skipped, cargo 17s). In build.rs, touching a source file without changing it is now skipped by the content hash.
Not included: PR preview deploys (needs a hosting and cost decision, see the thread), and CI target caching. Not tested:
--tunnelend to end from a clean state beyond manual runs, and the build.rs notice on terminals without /dev/tty.