julia
bf18eaf6 - loading: split package location into a pure step and a disk reify step

Commit
52 days ago
loading: split package location into a pure step and a disk reify step Package location previously interleaved pure computation (deciding, from the parsed project and manifest, where a package's source should be) with disk access (searching the depots and checking for the entry file). Profiling shows the pure part is negligible (~0.04 us/pkg) while the filesystem access accounts for essentially all of the cost. Separate the two. `_logical_locate` is now a pure function of the (project, manifest) pair that returns a `LogicalLoadSpec` describing candidate package roots, leaving a package that resides in a depot as a `@depot/packages/<Name>/ <slug>` placeholder (which depot actually holds it being the only disk-dependent, ambiguous part). `reify` then expands `@depot` against `DEPOT_PATH` and forms the entry path, confining all filesystem access to that step. Because the pure result depends only on the two files, it is cheap to compute, cache and serialize, which is a prerequisite for handing resolved environment information to precompile workers instead of having each re-read and re-parse it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U6CRtWWcxos7Q3pxPErehw Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
Parents
Loading