Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a make -j bug, by ensuring Lazy depends on CamlinternalLazy. #2148

Merged
merged 1 commit into from Nov 18, 2018

Commits on Nov 14, 2018

  1. 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 dependency on CamlinternalLazy into lazy.mli.
    Its presence makes ocamldep see that all files that use Lazy also
    depend on camlinternalLazy.cmi.
    stedolan committed Nov 14, 2018
    Copy the full SHA
    122c521 View commit details
    Browse the repository at this point in the history