Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a make -j bug, by ensuring Lazy depends on CamlinternalLazy.
Without this patch, make -j often fails to build the stdlib with a message along the lines of: no cmx file was found in path for module CamlinternalLazy The issue is that stdlib files that use `lazy` actually depend on camlinternalLazy.cmi because matching.ml expands lazy pattern matches to code that refers to CamlinternalLazy. However, since this dependency does not appear in the source code, there is no way for ocamldep to discover it. This means that when building the stdlib, there is no constraint ensuring that CamlinternalLazy is built before stdlib modules using Lazy. This causes issues with parallel make, but the issue can be reproduced using a sequential make invocation: cd stdlib make clean make stdlib_stream.cmo This patch adds a module alias to CamlinternalLazy into lazy.mli. This alias is not used, but its presence makes ocamldep see that all files that use Lazy depend on camlinternallazy.cmi.
- Loading branch information