Commit Graph

3 Commits

Author SHA1 Message Date
d1d01cb300 Share world output locks across spelling variants 2026-11-24 22:32:54 -08:00
14a79bcde1 world_build: key the output lock on the resolved path
_exclusive_output hashed normcase(abspath(out_dir)), so an 8.3 name or a
junction/symlink spelling of the same output folder took a different lock
and a second build ran into the first one's staging. Hash
normcase(realpath(out_dir)) instead; for an output folder that does not
exist yet, realpath resolves the existing parent and appends the rest, so
two first runs through different spellings still collide.

The new tests hold the lock in a child through one spelling and expect a
build through the 8.3 spelling (skipped when the volume has no 8.3 names)
and through a junction (symlink off Windows) to be refused, both before
and after the output folder exists.
2026-11-22 22:29:45 +00:00
b5c90c2102 world_build: keep concurrent builds out of one output
Staging cleanup, publication and stale-chunk pruning all work on the shared
output directory, so two builds into it could delete each other's staged
chunks. Hold an OS file lock keyed by the normalized output path for the whole
build; a second build gets a clear error instead of interfering. The lock lives
in the system temp directory, so output contents and failure cleanup are
unchanged.

Credit @lucastayaralvarenga-ui for the finding.
2026-11-22 13:48:31 -06:00