You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b79caff
Browse filesBrowse the repository at this point in the historyBrowse files
Start dependents once a module's interface is final
Why:
A dependent only needs a module's .cmi to type check, but it waits
until that module has also produced its lambda, JavaScript, .cmj and
.cmt. On builds limited by a long dependency chain most job slots sit
idle on the critical path: a 136 module library gets only 1.6x from 7
domains.
When a slot would otherwise idle, a module can now start as soon as each
unfinished dependency's interface is final: an implementation without
.resi has computed the .cmi it is about to write (with no pending warning
as error), or an interface file has compiled. The early request reads
those .cmi files from memory and waits at a gate before writing any file
or returning its result. The scheduler adopts it at the point master would
have started it (dependencies complete, module still dirty), so its code
generation sees the dependencies' .cmj files, and artifacts, diagnostics
and compiler.log are unchanged. Otherwise it is abandoned without effects,
together with anything that started on top of it.
A redirected lookup matches directories by identity (device and inode,
or the Windows file id). A lookup that might be another spelling of a
published file, or a directory that can't be identified, waits for
adoption instead of reading the disk. Modules with js-post-build commands
or lowercase .cmi names don't release their dependents early, and with
one domain nothing changes.
Review: Can a dependent see an interface that differs from master's?
It reads the exact bytes the dependency then writes, and it is only
adopted after the dependency completed. If the dependency fails later,
for example in code generation, the dependent is abandoned before it
wrote or reported anything.
- Build: start type checking a module as soon as the interfaces of its dependencies are final, instead of waiting for their JavaScript generation, which shortens builds limited by long dependency chains.
0 commit comments