Skip to content

Digests are calculated for files that are not part of any rule #4438

@jchavarri

Description

@jchavarri

Expected Behavior

When building a project, md5 digests should only be calculated for files that are part of a rule (either input or target I assume).

Actual Behavior

Digests are calculated for files that are not part of any rule.

Reproduction

  1. Create a new project with dune init project test && cd test
  2. Check build time with time dune build @all:
    real	0m0.368s
    user	0m0.316s
    sys	0m0.218s
    
  3. Create a very large file fallocate -l 10G elephant.img
  4. Run build again with time dune build @all:
    real	0m45.851s
    user	0m35.427s
    sys	0m10.402s
    

By adding some logging I could check that it creates digests twice, for both test/elephant.img and _build/default/elephant.img.

Specifications

  • Version of dune (output of dune --version): main branch (d75bd88), can reproduce as well with v 2.8.5 published in opam
  • Version of ocaml (output of ocamlc --version): 4.12.0
  • Operating system (distribution and version): Debian 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions