Skip to content

Commit

Permalink
Merge pull request #3249 from artempyanykh/dune-cache-freeze
Browse files Browse the repository at this point in the history
[cache] Fix dune freezing on MacOS with cache enabled
  • Loading branch information
mefyl authored Mar 9, 2020
2 parents 3b92d40 + aeef4cd commit 4ae6363
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
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

0 comments on commit 4ae6363

Please sign in to comment.