mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 07:16:11 +00:00
1.7 KiB
1.7 KiB
Lessons
- Forgejo push mirrors to localhost are blocked by default; set
ALLOW_LOCALNETWORKSin throwaway test instances. git clone --baresets noremote.origin.fetch; without itfetchnever createsrefs/remotes/*. Usereceive::ensure_fetch_refspec.Git::runtrims stdout, which also eats the leading space of the firststatus --porcelainline (M xbecomesM x). Don't assert on that format viarun.- Fetch other machines' snapshots into
refs/sync-remote/*, never intorefs/sync/*, or a fetch can clobber this machine's own refs. - Run tests that create many temp repos with unique dir names (pid + nanos + counter) via the shared RAII
test-support/tmp.rs(TempDir, included with#[path]); never callstd::env::temp_dir()directly in a test. - Tests must clean their temp dirs, also on failure:
/tmpis tmpfs and ran out of inodes after a day ofcargo testruns. UseTempDir(removed on drop) and kill spawned daemons by their ownChildhandle before the dir goes. - Bare-layout clones must set upstream tracking per branch, or
statussilently reports Synced for Behind/Diverged. Assert tracking in tests of any clone path. - Unix socket paths are limited to ~100 bytes: use a short
XDG_RUNTIME_DIR(e.g./tmp/gd) when running a daemon from deep scratch dirs. - Mock-server tests must parse the JSON request body; pretty-printed JSON breaks string asserts.
- Slint (winit/Wayland):
show()from an idle event loop leaves the window unmapped until another event arrives; follow it with a one-shotrequest_redrawtimer. - Slint has no top-level
function; use aglobal. A wrappedTextunder-reports its preferred height inside layouts, so elide long log/error text instead of wrapping it.