Skip to main content

assemble_stable

Function assemble_stable 

Source
pub fn assemble_stable(entry: &Path) -> Result<String, String>
Expand description

An example page’s assembled source — entry’s project closure through crate::analysis::assemble_project, the same function largo build --static compiles from, not a raw single-file read. A page that shares a layout or a type across files (Import Layout. + {extends Site}, Import Shared.) is a normal project; a discovery path that reads only the one file it happened to be pointed at is what misdiagnoses that page, not the page.

Retried like a single-file read_stable: assembly reads the entry AND every file it imports straight off disk itself, so a page beside another process’s mid-write (a live, multi-file corpus) must not read as a spurious failure any more than a single-file read would. Returns the underlying assembly error only once 20 attempts, 5ms apart, never produce a reading that repeats — a real, persistent problem, not a torn one.