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

[cache] Fix dune freezing on MacOS with cache enabled #3249

Merged
merged 2 commits into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/cache_daemon/cache_daemon.ml
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,9 @@ let client_thread (events, (client : client)) =
in
handle client
and finally () =
( try
Unix.shutdown client.fd Unix.SHUTDOWN_ALL;
Unix.close client.fd
( try Unix.shutdown client.fd Unix.SHUTDOWN_ALL
with Unix.Unix_error (Unix.ENOTCONN, _, _) -> () );
Unix.close client.fd;
Evt.sync (Evt.send events (Client_left client.fd))
in
try Exn.protect ~f ~finally with
Expand Down
3 changes: 1 addition & 2 deletions test/blackbox-tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,7 @@
(action
(chdir
test-cases/dune-cache/trim
(progn (run dune-cram run run.t) (diff? run.t run.t.corrected))))
(enabled_if (<> %{ocaml-config:system} macosx)))
(progn (run dune-cram run run.t) (diff? run.t run.t.corrected)))))

(rule
(alias dune-init)
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/gen_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ let exclusions =
; make "merlin/merlin-tests" ~external_deps:true
; make "use-meta" ~external_deps:true
; make "output-obj" ~skip_platforms:[ Mac; Win ] ~only_ocaml:(">=", "4.06.0")
; make "dune-cache/trim" ~skip_platforms:[ Mac ]
; make "dune-cache/trim"
; make "github644" ~external_deps:true
; make "private-public-overlap" ~external_deps:true
; make "reason" ~external_deps:true
Expand Down