Skip to content

Commit c5bfb52

Browse files
committed
fix: Disable learn-ocaml build --jobs=n option for now
Related: ocaml-sf#414
1 parent c2399b0 commit c5bfb52

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/main/learnocaml_main.ml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ module Args = struct
187187

188188
let jobs =
189189
value & opt int 1 & info ["jobs";"j"] ~docv:"INT" ~doc:
190-
"Number of building jobs to run in parallel"
190+
"Number of building jobs to run in parallel \
191+
(only accept '$(b,--jobs=1)' for now, cf. issue #414)."
191192

192193
type t = {
193194
contents_dir: string;
@@ -216,8 +217,10 @@ module Args = struct
216217
repo_dir/"tutorials";
217218
Learnocaml_process_playground_repository.playground_dir :=
218219
repo_dir/"playground";
219-
Learnocaml_process_exercise_repository.n_processes := jobs;
220-
()
220+
Learnocaml_process_exercise_repository.n_processes := 1;
221+
if jobs >= 2
222+
then failwith "only accept --jobs=1 for now (cf. issue #414)"
223+
else ()
221224
in
222225
Term.(const apply $repo_dir $exercises_filtered $jobs)
223226

src/repo/learnocaml_process_exercise_repository.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ let main dest_dir =
227227
Grader_cli.grade ?print_result ?dirname meta exercise json_path
228228
>|= fun r -> print_grader_error exercise r; r
229229
else
230+
let () = failwith "only accept --jobs=1 for now (cf. issue #414)" in
230231
Lwt_list.map_p,
231232
spawn_grader
232233
in

0 commit comments

Comments
 (0)