-
Notifications
You must be signed in to change notification settings - Fork 414
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
[Cache] Cache daemon is not Windows compatible #4167
Comments
The direct mode should work on Windows however. |
Yeah, I just skimmed the code, but the direct mode should work. |
Oh, no, the direct mode doesn't seem to work on Windows too.
|
The error message comes from |
@dra27 -sensei always works incredibly efficiently... |
Fixed in 2.8.3 |
I don't think this should be closed because daemon is still not working. Only direct mode now works. |
Indeed. Let’s keep it open until we fix the other modes as well. |
We've made some progress in the direct mode, but I'm seeing another strange problem that only occurs on Windows. https://github.com/ocsigen/js_of_ocaml/runs/2159269998?check_suite_focus=true#step:8:321
|
What about other packages? Say I'm not sure why there's no permissions. The directory is being created by dune inside a location which should be writeable.
Perhaps @snowleopard or @dra27 might know? |
Yeah, this is strange. To avoid such problems, actions-ml automatically overrides the some permissions every time on Windows like this.
|
I just tried to install angstrom, and it works as expected! |
I have a suspicion about what this might be, but I'm a bit pressed for time (as ever!). Please could I have a clear repro case - ideally a Dune invocation, but an opam one will do which repeatably shows this failure? |
I will create a repro case after I get home. |
I made the smallest repro case here: |
Thanks, @smorimoto! I was able to take that and reduce it to a direct build of ocaml-uri with Dune. It's repeatable which is handy. I'm very puzzled as to why you're messing around with The issue is a race condition - I've had a brief exchange with @snowleopard and we're suspicious of: Lines 238 to 278 in 5326730
The file The |
Thanks for the investigation @dra27! I self-assigned to fix the race, hopefully, I'll get to it soon. @smorimoto Could you confirm if using the |
@dra27 Although fsutil is mainly set for Cygwin, it has nothing to do with this caching problem! |
@smorimoto That's great, thank you for confirming. |
What's it being used for on Cygwin? |
IIRC, it was necessary for |
Fix a race in Dune cache. It was particularly easy to hit this race when using the cache on Windows, see #4167. Signed-off-by: Andrey Mokhov <[email protected]>
@smorimoto I've fixed the race in #4406. It would be very helpful if you could confirm if the main branch works for you. |
@snowleopard That was very fast work! and the PR fixed the bug as expected: https://github.com/smorimoto/ocaml-dune-repro-4167/runs/2209405229 |
@smorimoto Thank you, happy to see the fix worked! Do we need to fix anything else in the cache daemon on Windows, or can this issue be now closed? |
Fix a race in Dune cache. It was particularly easy to hit this race when using the cache on Windows, see #4167. Signed-off-by: Andrey Mokhov <[email protected]> Signed-off-by: Rudi Grinberg <[email protected]>
I'm not sure that @fpottier's was intended to close this?! |
Definitely not! Due to strange specs of GitHub, an incorrect close occurs! 🤣 |
By the way, we've recently completely rewritten the implementation of the shared cache in Dune. In particular, there is no cache daemon anymore. It is still worth testing the new implementation on Windows, of course. The docs for the new shared cache can be found here: https://github.com/ocaml/dune/blob/main/doc/caching.rst. (For some reason, the docs here haven't been regenerated yet.) |
Oh, then we can close this. Are changes such as cache going to be released as dune 3? |
Yes, that's right. |
I can't wait for dune 3! Thank you for a lot of your efforts on this. |
@smorimoto We're looking forward to Dune 3 too! Thanks for your help with testing Dune cache on Windows. |
The cache daemon uses
Unix.fork
and is not Windows compatible. It should be easy to fix, but to make sure I don't forget that, I write it down as a quick issue.The text was updated successfully, but these errors were encountered: