Skip to content

Commit

Permalink
Apply alizter suggestions from PR
Browse files Browse the repository at this point in the history
Signed-off-by: Jonah Beckford <71855677+jonahbeckford@users.noreply.github.com>
  • Loading branch information
jonahbeckford committed Mar 14, 2023
1 parent 9b2df02 commit b3fe080
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/dune_config/dune_config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ let auto_concurrency =
in
loop commands)

let for_scheduler (t : t) ?watch_exclusions stats ~insignificant_changes
~signal_watcher =
let for_scheduler (t : t) ?(watch_exclusions = standard_watch_exclusions) stats
~insignificant_changes ~signal_watcher =
let concurrency =
match t.concurrency with
| Fixed i -> i
Expand All @@ -476,6 +476,5 @@ let for_scheduler (t : t) ?watch_exclusions stats ~insignificant_changes
; stats
; insignificant_changes
; signal_watcher
; watch_exclusions =
Option.value watch_exclusions ~default:standard_watch_exclusions
; watch_exclusions
}
6 changes: 6 additions & 0 deletions src/dune_config/dune_config.mli
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ val hash : t -> int

val equal : t -> t -> bool

(** [for_scheduler config ?watch_exclusions stats_opt ~insignificant_changes
~signal_watcher]
creates a configuration for a scheduler from the user-visible Dune [config].
[watch_exclusions] defaults to {!standard_watch_exclusions} if not
specified. *)
val for_scheduler :
t
-> ?watch_exclusions:string list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
let printf = Printf.printf

let test string =
printf "should_exclude(%s) = %s\n" string
printf "should_exclude(%s) = %b\n" string
(Dune_file_watcher.For_tests.should_exclude string
Dune_config.standard_watch_exclusions
|> Bool.to_string)
Dune_config.standard_watch_exclusions)

let%expect_test _ =
test "file.ml";
Expand Down

0 comments on commit b3fe080

Please sign in to comment.