diff options
| author | Maxime Dénès | 2018-04-09 10:07:23 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2018-04-09 10:07:23 +0200 |
| commit | 5a6e544c8ef5baa48470ea46a233f8fe6b360ada (patch) | |
| tree | e5e3235ac751ab93224eb535dc5a7475b8fa61c7 | |
| parent | 2feb32e1c4329520fa80a3a54f8986d6978ae444 (diff) | |
| parent | b6ea08b66f874de1ed787cdea68d058dad5ac9ad (diff) | |
Merge PR #7184: [toplevel] Fix path initialization before vio processing (closes #7044)
| -rw-r--r-- | toplevel/coqtop.ml | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index a08cfa9f48..0dabed6b71 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -315,16 +315,24 @@ let check_vio_tasks opts = (* vio files *) let schedule_vio opts = - (* We must add update the loadpath here as the scheduling process - happens outside of the STM *) - let iload_path = build_load_path opts in - List.iter Mltop.add_coq_path iload_path; - if opts.vio_checking then Vio_checking.schedule_vio_checking opts.vio_files_j opts.vio_files else Vio_checking.schedule_vio_compilation opts.vio_files_j opts.vio_files +let do_vio opts = + (* We must initialize the loadpath here as the vio scheduling + process happens outside of the STM *) + if opts.vio_files <> [] || opts.vio_tasks <> [] then + let iload_path = build_load_path opts in + List.iter Mltop.add_coq_path iload_path; + + (* Vio compile pass *) + if opts.vio_files <> [] then schedule_vio opts; + (* Vio task pass *) + if opts.vio_tasks <> [] then check_vio_tasks opts + + (******************************************************************************) (* Color Options *) (******************************************************************************) @@ -483,10 +491,9 @@ let init_toplevel arglist = end else begin try compile_files opts; - (* Vio compile pass *) - if opts.vio_files <> [] then schedule_vio opts; - (* Vio task pass *) - check_vio_tasks opts; + (* Careful this will modify the load-path and state so after + this point some stuff may not be safe anymore. *) + do_vio opts; (* Allow the user to output an arbitrary state *) outputstate opts; None, opts |
