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

Race condition building project with package management #10903

Open
gridbugs opened this issue Sep 11, 2024 · 3 comments
Open

Race condition building project with package management #10903

gridbugs opened this issue Sep 11, 2024 · 3 comments

Comments

@gridbugs
Copy link
Collaborator

Sometimes when building a project with package management I see this error:

    Building ocaml-base-compiler.5.2.0  
    Building ocaml-config.3      
    Building base-unix.base      
    Building ocaml.5.2.0         
    Building seq.base              
    Building ocamlfind.1.9.6+dune  
Error:                             
_build/.sandbox/bed9cbdb5ceececaf0c3aaddc1db1624/_private/default/.dev-tool/odoc/ocamlfind/source/0001-Harden-test-for-OCaml-5.patch:
No such file or directory
-> required by _build/_private/default/.dev-tool/odoc/ocamlfind/target/cookie
-> required by - package topkg
-> required by - package astring
-> required by - package odoc
    Building ocamlbuild.0.15.0+dune

I've seen this on a range of projects, but so far I've only seen it on this specific patch from ocamlfind's package. I don't have a reliable reproduction case yet. It happens very infrequently, and the project always builds as expected when I rerun the command.

@moyodiallo
Copy link
Collaborator

This is not linked to race condition. I've tried to print the file path, running dune fmt. I assume you're testing with #10647. It seems the problem is coming from there.

It prints:
extra_files: _build/_private/default/.pkg/ocamlfind/source/0001-Harden-test-for-OCaml-5.patch

instead of .dev-tool it is copying inside .pkg.

@moyodiallo
Copy link
Collaborator

This is not linked to race condition. I've tried to print the file path, running dune fmt. I assume you're testing with #10647. It seems the problem is coming from there.

It prints: extra_files: _build/_private/default/.pkg/ocamlfind/source/0001-Harden-test-for-OCaml-5.patch

instead of .dev-tool it is copying inside .pkg.

My bad, this is not true.

@moyodiallo
Copy link
Collaborator

I noticed every time you do an initial dune fmt the error appears and after that any time you try to rebuild without cleaning(removing the dev-tool locks), it's works.

I think there's a rule that coming before another one and it's not supposed to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants