From d363bd2d8257babbcb6db15bd83fd6465df7c268 Mon Sep 17 00:00:00 2001 From: Philippe Veber Date: Sat, 7 May 2022 09:07:57 +0200 Subject: [PATCH] update wrt core v0.15.0 --- bistro.opam | 3 ++- dune-project | 3 ++- lib/bio/ChIPQC.ml | 2 +- lib/bio/DESeq2.ml | 2 +- lib/bio/alignment_stats.ml | 2 +- lib/bio/bed.ml | 2 +- lib/bio/bedtools.ml | 2 +- lib/bio/bowtie.ml | 2 +- lib/bio/bowtie2.ml | 2 +- lib/bio/busco.ml | 2 +- lib/bio/cisa.ml | 2 +- lib/bio/cisbp.ml | 6 ++++-- lib/bio/comparative_genomics.ml | 2 +- lib/bio/deeptools.ml | 2 +- lib/bio/dnaseq_with_reference_genome.ml | 2 +- lib/bio/dune | 2 +- lib/bio/ensembl.ml | 2 +- lib/bio/examples/chen2008.ml | 2 +- lib/bio/fastq.ml | 2 +- lib/bio/fastq_sample.ml | 2 +- lib/bio/fastq_screen.ml | 2 +- lib/bio/hisat2.ml | 2 +- lib/bio/idba.ml | 2 +- lib/bio/iqtree.ml | 2 +- lib/bio/jaspar.ml | 4 +++- lib/bio/kallisto.ml | 2 +- lib/bio/macs.ml | 2 +- lib/bio/macs2.ml | 2 +- lib/bio/meme_suite.ml | 2 +- lib/bio/ncbi_genome.ml | 2 +- lib/bio/picardtools.ml | 2 +- lib/bio/prokka.ml | 2 +- lib/bio/raxml.ml | 2 +- lib/bio/samtools.ml | 2 +- lib/bio/spades.ml | 2 +- lib/bio/sra_toolkit.ml | 2 +- lib/bio/srst2.ml | 2 +- lib/bio/star.ml | 2 +- lib/bio/subread.ml | 2 +- lib/bio/tophat.ml | 2 +- lib/bio/trinity.ml | 14 +++++++------- lib/bio/ucsc_gb.ml | 4 ++-- lib/engine/db.ml | 3 +++ lib/engine/dune | 2 +- lib/engine/eval_thread.ml | 2 +- lib/engine/execution_env.ml | 2 +- lib/engine/execution_trace.ml | 2 +- lib/engine/local_backend.ml | 4 +++- lib/engine/lwt_queue.ml | 2 +- lib/engine/misc.ml | 3 +++ lib/engine/path.ml | 4 +++- lib/engine/scheduler.ml | 3 +++ lib/engine/shell_command.ml | 5 ++++- lib/engine/singularity.ml | 2 +- lib/multinode/bistro_multinode.ml | 2 +- lib/multinode/bistro_multinode.mli | 5 ++--- lib/utils/console_logger.ml | 6 ++++-- lib/utils/dune | 2 +- lib/utils/html_logger.ml | 6 ++++-- lib/utils/repo.ml | 2 ++ ppx/bistro_script.ml | 3 ++- 61 files changed, 97 insertions(+), 69 deletions(-) diff --git a/bistro.opam b/bistro.opam index 71869f0b..36a6bc83 100644 --- a/bistro.opam +++ b/bistro.opam @@ -27,7 +27,8 @@ depends: [ "base64" "bos" "dune" {> "1.6"} - "core" {>= "0.12.0"} + "core" {>= "0.15.0"} + "core_unix" {>= "0.15.0"} "lwt" {>= "3.2.0"} "lwt_react" "ocamlgraph" {>= "1.8.7"} diff --git a/dune-project b/dune-project index b389c034..fe67f115 100644 --- a/dune-project +++ b/dune-project @@ -33,7 +33,8 @@ Features: base64 bos (dune (> 1.6)) - (core (>= 0.12.0)) + (core (>= 0.15.0)) + (core_unix (>= 0.15.0)) (lwt (>= 3.2.0)) lwt_react (ocamlgraph (>= 1.8.7)) diff --git a/lib/bio/ChIPQC.ml b/lib/bio/ChIPQC.ml index de4290f8..326470a4 100644 --- a/lib/bio/ChIPQC.ml +++ b/lib/bio/ChIPQC.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl open Formats diff --git a/lib/bio/DESeq2.ml b/lib/bio/DESeq2.ml index 29c405d3..e4029815 100644 --- a/lib/bio/DESeq2.ml +++ b/lib/bio/DESeq2.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/alignment_stats.ml b/lib/bio/alignment_stats.ml index 2b986ec9..6fde57ff 100644 --- a/lib/bio/alignment_stats.ml +++ b/lib/bio/alignment_stats.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Formats diff --git a/lib/bio/bed.ml b/lib/bio/bed.ml index 0ff9faa0..ffca31bb 100644 --- a/lib/bio/bed.ml +++ b/lib/bio/bed.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/bedtools.ml b/lib/bio/bedtools.ml index 9e0d055b..4a5a8b65 100644 --- a/lib/bio/bedtools.ml +++ b/lib/bio/bedtools.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/bowtie.ml b/lib/bio/bowtie.ml index 5992aeb9..90674ff3 100644 --- a/lib/bio/bowtie.ml +++ b/lib/bio/bowtie.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/bowtie2.ml b/lib/bio/bowtie2.ml index 34bd9d11..45100572 100644 --- a/lib/bio/bowtie2.ml +++ b/lib/bio/bowtie2.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/busco.ml b/lib/bio/busco.ml index edf5a8f3..fd8202a5 100644 --- a/lib/bio/busco.ml +++ b/lib/bio/busco.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/cisa.ml b/lib/bio/cisa.ml index 809ac769..3b5c7afa 100644 --- a/lib/bio/cisa.ml +++ b/lib/bio/cisa.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/cisbp.ml b/lib/bio/cisbp.ml index 4efa032e..e56f6c5d 100644 --- a/lib/bio/cisbp.ml +++ b/lib/bio/cisbp.ml @@ -1,6 +1,8 @@ -open Core_kernel +open Core open Bistro +module Sys = Sys_unix + let fetch_pwm_archive : [`cisbp] directory = Bistro_unix.wget Biotk.Cisbp.pwm_archive_url |> Bistro_unix.unzip @@ -55,7 +57,7 @@ let annotated_motifs = let threshold = Biotk.Pwm_stats.TFM_pvalue.score_of_pvalue pwm (Biotk.Pwm.flat_background ()) 1e-4 in let rc_pwm = Biotk.Pwm.reverse_complement pwm in ignore ( - Sys.command (sprintf "echo %s %s %d/%d >> delme" Time.(now () |> to_string) tf_name i n) + Sys.command (sprintf "echo %s %s %d/%d >> delme" Time_unix.(now () |> to_string) tf_name i n) : int ) ; { id ; tf_name ; pwm ; rc_pwm ; threshold ; infos } diff --git a/lib/bio/comparative_genomics.ml b/lib/bio/comparative_genomics.ml index 50a51710..f555ac20 100644 --- a/lib/bio/comparative_genomics.ml +++ b/lib/bio/comparative_genomics.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro let select_refseq_genomes ~pattern = [%workflow diff --git a/lib/bio/deeptools.ml b/lib/bio/deeptools.ml index 0dcff61a..a2fbab1a 100644 --- a/lib/bio/deeptools.ml +++ b/lib/bio/deeptools.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/dnaseq_with_reference_genome.ml b/lib/bio/dnaseq_with_reference_genome.ml index cb59aeca..08c67732 100644 --- a/lib/bio/dnaseq_with_reference_genome.ml +++ b/lib/bio/dnaseq_with_reference_genome.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Biotk open Formats diff --git a/lib/bio/dune b/lib/bio/dune index d8d79681..3e8abe19 100644 --- a/lib/bio/dune +++ b/lib/bio/dune @@ -1,5 +1,5 @@ (library (name bistro_bio) (public_name bistro-bio) - (libraries biocaml.ez biotk bistro.unix tyxml) + (libraries biocaml.ez biotk bistro.unix core_unix.time_unix core_unix.sys_unix tyxml) (preprocess (pps ppx_bistro ppx_sexp_conv))) diff --git a/lib/bio/ensembl.ml b/lib/bio/ensembl.ml index 7af662dc..ceee6066 100644 --- a/lib/bio/ensembl.ml +++ b/lib/bio/ensembl.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/examples/chen2008.ml b/lib/bio/examples/chen2008.ml index caa28590..c2e40933 100644 --- a/lib/bio/examples/chen2008.ml +++ b/lib/bio/examples/chen2008.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro_bio open Biotk diff --git a/lib/bio/fastq.ml b/lib/bio/fastq.ml index bb695f9b..63e5f0c9 100644 --- a/lib/bio/fastq.ml +++ b/lib/bio/fastq.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/fastq_sample.ml b/lib/bio/fastq_sample.ml index e84e120a..480d9b80 100644 --- a/lib/bio/fastq_sample.ml +++ b/lib/bio/fastq_sample.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Biotk open Formats diff --git a/lib/bio/fastq_screen.ml b/lib/bio/fastq_screen.ml index 7e6b2f8e..ceac39a0 100644 --- a/lib/bio/fastq_screen.ml +++ b/lib/bio/fastq_screen.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/hisat2.ml b/lib/bio/hisat2.ml index af86d7d4..ff1bde9a 100644 --- a/lib/bio/hisat2.ml +++ b/lib/bio/hisat2.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/idba.ml b/lib/bio/idba.ml index 25e3d0c2..3c32f8ac 100644 --- a/lib/bio/idba.ml +++ b/lib/bio/idba.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/iqtree.ml b/lib/bio/iqtree.ml index 8cedee11..da6f0fa6 100644 --- a/lib/bio/iqtree.ml +++ b/lib/bio/iqtree.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/jaspar.ml b/lib/bio/jaspar.ml index df5bc17d..3ead31a6 100644 --- a/lib/bio/jaspar.ml +++ b/lib/bio/jaspar.ml @@ -1,6 +1,8 @@ -open Core_kernel +open Core open Bistro +module Sys = Sys_unix + let core_vertebrates_non_redundant = Bistro_unix.wget ~user_agent:{|"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22"|} diff --git a/lib/bio/kallisto.ml b/lib/bio/kallisto.ml index 38939d6a..beacfc9c 100644 --- a/lib/bio/kallisto.ml +++ b/lib/bio/kallisto.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/macs.ml b/lib/bio/macs.ml index 296e9eed..7136a62b 100644 --- a/lib/bio/macs.ml +++ b/lib/bio/macs.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl open Formats diff --git a/lib/bio/macs2.ml b/lib/bio/macs2.ml index f33b9e73..dd9b689a 100644 --- a/lib/bio/macs2.ml +++ b/lib/bio/macs2.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl open Formats diff --git a/lib/bio/meme_suite.ml b/lib/bio/meme_suite.ml index 67f9a140..4fb77780 100644 --- a/lib/bio/meme_suite.ml +++ b/lib/bio/meme_suite.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/ncbi_genome.ml b/lib/bio/ncbi_genome.ml index 7d40f243..6bdc7535 100644 --- a/lib/bio/ncbi_genome.ml +++ b/lib/bio/ncbi_genome.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core let assembly_summary = Bistro_unix.wget Biotk.Ncbi_genome.refseq_assembly_summary_url diff --git a/lib/bio/picardtools.ml b/lib/bio/picardtools.ml index ed97a9c3..ef42a25a 100644 --- a/lib/bio/picardtools.ml +++ b/lib/bio/picardtools.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/prokka.ml b/lib/bio/prokka.ml index eab5a200..ab18906b 100644 --- a/lib/bio/prokka.ml +++ b/lib/bio/prokka.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/raxml.ml b/lib/bio/raxml.ml index b5e160eb..ad558f0b 100644 --- a/lib/bio/raxml.ml +++ b/lib/bio/raxml.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/samtools.ml b/lib/bio/samtools.ml index e5b8b824..2e76021d 100644 --- a/lib/bio/samtools.ml +++ b/lib/bio/samtools.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/spades.ml b/lib/bio/spades.ml index feedfa84..8bcd7534 100644 --- a/lib/bio/spades.ml +++ b/lib/bio/spades.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/sra_toolkit.ml b/lib/bio/sra_toolkit.ml index fcdb40eb..131b7233 100644 --- a/lib/bio/sra_toolkit.ml +++ b/lib/bio/sra_toolkit.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/srst2.ml b/lib/bio/srst2.ml index cda63c43..9713c253 100644 --- a/lib/bio/srst2.ml +++ b/lib/bio/srst2.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/star.ml b/lib/bio/star.ml index c683dc6c..c791c795 100644 --- a/lib/bio/star.ml +++ b/lib/bio/star.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/subread.ml b/lib/bio/subread.ml index ea131846..7e2c0c1b 100644 --- a/lib/bio/subread.ml +++ b/lib/bio/subread.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/tophat.ml b/lib/bio/tophat.ml index a284deff..5514d099 100644 --- a/lib/bio/tophat.ml +++ b/lib/bio/tophat.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl diff --git a/lib/bio/trinity.ml b/lib/bio/trinity.ml index 3e76ab82..c97ef536 100644 --- a/lib/bio/trinity.ml +++ b/lib/bio/trinity.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl @@ -43,9 +43,9 @@ let trinity ?(mem = 128) ?(threads = 4) ?no_normalize_reads ?run_as_paired option (flag string "--run_as_paired") run_as_paired ; option (opt "--min_kmer_cov" int) min_kmer_cov ; option ss_lib_type_option ss_lib_type ; - opt "--CPU" ident np ; - opt "--max_memory" ident (seq [ string "$((" ; Bistro.Shell_dsl.mem ; string " / 1024))G" ]) ; - opt "--output" ident tmp_dest ; + opt "--CPU" Fun.id np ; + opt "--max_memory" Fun.id (seq [ string "$((" ; Bistro.Shell_dsl.mem ; string " / 1024))G" ]) ; + opt "--output" Fun.id tmp_dest ; ] ; cmd "mv" [ tmp_dest // "Trinity.fasta" ; @@ -93,12 +93,12 @@ let insilico_read_normalization ?(mem = 128) ?pairs_together ?parallel_stats ~ma cmd "$TRINITY_HOME/util/insilico_read_normalization.pl" [ string "--seqType fq" ; fq_option_template se_or_pe_fq ; - opt "--CPU" ident np ; - opt "--JM" ident (seq [ string "$((" ; Bistro.Shell_dsl.mem ; string " / 1024))G" ]) ; + opt "--CPU" Fun.id np ; + opt "--JM" Fun.id (seq [ string "$((" ; Bistro.Shell_dsl.mem ; string " / 1024))G" ]) ; opt "--max_cov" int max_cov ; option (flag string "--pairs_together") pairs_together ; option (flag string "--PARALLEL_STATS") parallel_stats ; - opt "--output" ident tmp ; + opt "--output" Fun.id tmp ; ] in let workflow post = diff --git a/lib/bio/ucsc_gb.ml b/lib/bio/ucsc_gb.ml index 0a5fe98a..2c680c59 100644 --- a/lib/bio/ucsc_gb.ml +++ b/lib/bio/ucsc_gb.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro open Bistro.Shell_dsl open Formats @@ -143,7 +143,7 @@ let faToTwoBit fa = ] (* (\* let fetch_sequences (File seq2b) locations = *\) *) -(* (\* let open Core_kernel in *\) *) +(* (\* let open Core in *\) *) (* (\* Core_extended.Sys_utils.with_tmp ~pre:"gzm" ~suf:".seqList" (fun seqList -> *\) *) (* (\* Core_extended.Sys_utils.with_tmp ~pre:"gzm" ~suf:".fa" (fun fa -> *\) *) (* (\* (\\* Write locations to a file *\\) *\) *) diff --git a/lib/engine/db.ml b/lib/engine/db.ml index 36e67328..a4ff9d52 100644 --- a/lib/engine/db.ml +++ b/lib/engine/db.ml @@ -3,6 +3,9 @@ open Core open Rresult +module Sys = Sys_unix +module Unix = Core_unix + type id = string let ok_exn = function diff --git a/lib/engine/dune b/lib/engine/dune index bf7d3ca5..53a83baf 100644 --- a/lib/engine/dune +++ b/lib/engine/dune @@ -1,4 +1,4 @@ (library (name bistro_engine) (public_name bistro.engine) - (libraries bistro bos core lwt.unix re rresult)) + (libraries bistro bos core core_unix core_unix.sys_unix lwt.unix re rresult)) diff --git a/lib/engine/eval_thread.ml b/lib/engine/eval_thread.ml index 7f769036..bf7a077a 100644 --- a/lib/engine/eval_thread.ml +++ b/lib/engine/eval_thread.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core type 'a t = ('a, Execution_trace.Set.t) Lwt_result.t diff --git a/lib/engine/execution_env.ml b/lib/engine/execution_env.ml index d5841244..bb15747f 100644 --- a/lib/engine/execution_env.ml +++ b/lib/engine/execution_env.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro_internals module Unix = Caml_unix diff --git a/lib/engine/execution_trace.ml b/lib/engine/execution_trace.ml index b45d8114..865a9431 100644 --- a/lib/engine/execution_trace.ml +++ b/lib/engine/execution_trace.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core module Outcome = struct type t = [ diff --git a/lib/engine/local_backend.ml b/lib/engine/local_backend.ml index 00dfef77..877b9c47 100644 --- a/lib/engine/local_backend.ml +++ b/lib/engine/local_backend.ml @@ -2,6 +2,8 @@ open Core open Lwt.Infix open Bistro_internals +module Unix = Core_unix + type t = { logger : Logger.t ; db : Db.t ; @@ -57,7 +59,7 @@ let eval _ () f x = (fun () -> let ic = Lwt_io.of_unix_fd ~mode:Lwt_io.input read_from_child in Lwt_io.read_value ic >>= fun (res : (unit, string) result) -> - Caml.Unix.kill (Pid.to_int pid) Caml.Sys.sigkill; + Caml_unix.kill (Pid.to_int pid) Caml.Sys.sigkill; Misc.waitpid (Pid.to_int pid) >>= fun _ -> Unix.close read_from_child ; Unix.close write_to_child ; diff --git a/lib/engine/lwt_queue.ml b/lib/engine/lwt_queue.ml index d00cff6d..0338ca4f 100644 --- a/lib/engine/lwt_queue.ml +++ b/lib/engine/lwt_queue.ml @@ -1,5 +1,5 @@ open Lwt.Infix -open Core_kernel +open Core type 'a t = { queue : 'a Queue.t ; diff --git a/lib/engine/misc.ml b/lib/engine/misc.ml index cfdbf2eb..ad9cc956 100644 --- a/lib/engine/misc.ml +++ b/lib/engine/misc.ml @@ -1,5 +1,8 @@ open Core +module Sys = Sys_unix +module Unix = Core_unix + let digest x = Md5.to_hex (Md5.digest_string (Marshal.to_string x [])) diff --git a/lib/engine/path.ml b/lib/engine/path.ml index 6c90fbc2..3d97491e 100644 --- a/lib/engine/path.ml +++ b/lib/engine/path.ml @@ -1,4 +1,6 @@ -open Core_kernel +open Core + +module Sys = Sys_unix type t = string list [@@deriving sexp] diff --git a/lib/engine/scheduler.ml b/lib/engine/scheduler.ml index 5aa23f4d..e32bd0f1 100644 --- a/lib/engine/scheduler.ml +++ b/lib/engine/scheduler.ml @@ -1,7 +1,10 @@ open Core open Lwt.Infix open Bistro_internals + module W = Bistro_internals.Workflow +module Sys = Sys_unix +module Unix = Core_unix type error = [ | `Msg of string diff --git a/lib/engine/shell_command.ml b/lib/engine/shell_command.ml index e7a8efa5..802624d9 100644 --- a/lib/engine/shell_command.ml +++ b/lib/engine/shell_command.ml @@ -1,6 +1,9 @@ open Core open Bistro_internals +module Sys = Sys_unix +module Unix = Core_unix + type file_dump = File_dump of { text : string ; path : string ; @@ -241,7 +244,7 @@ let run (Command cmd as c) = Lwt_process.exec ~stdout ~stderr (Lwt_process.shell invocation) >>= fun status -> (* Lwt_unix.unlink script_file >>= fun () -> *) - let exit_code = Caml.Unix.( + let exit_code = Caml_unix.( match status with | WEXITED code | WSIGNALED code diff --git a/lib/engine/singularity.ml b/lib/engine/singularity.ml index 5933ce08..f55822a8 100644 --- a/lib/engine/singularity.ml +++ b/lib/engine/singularity.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro_internals open Lwt.Infix diff --git a/lib/multinode/bistro_multinode.ml b/lib/multinode/bistro_multinode.ml index 200371e5..01dc5ac8 100644 --- a/lib/multinode/bistro_multinode.ml +++ b/lib/multinode/bistro_multinode.ml @@ -1,4 +1,4 @@ -open Core_kernel +open Core open Bistro_engine open Lwt.Infix diff --git a/lib/multinode/bistro_multinode.mli b/lib/multinode/bistro_multinode.mli index de377dc8..abb18b9a 100644 --- a/lib/multinode/bistro_multinode.mli +++ b/lib/multinode/bistro_multinode.mli @@ -1,9 +1,8 @@ -open Core_kernel open Bistro open Bistro_engine module Client : sig - val command : Command.t + val command : Core.Command.t end module Server : sig @@ -38,5 +37,5 @@ module Server : sig val simple_command : summary:string -> 'a workflow -> - Command.t + Core.Command.t end diff --git a/lib/utils/console_logger.ml b/lib/utils/console_logger.ml index 446e5419..c026203d 100644 --- a/lib/utils/console_logger.ml +++ b/lib/utils/console_logger.ml @@ -2,11 +2,13 @@ open Core open Lwt open Bistro_engine -let zone = Lazy.force Time.Zone.local +module Unix = Core_unix + +let zone = Lazy.force Time_unix.Zone.local let msg t fmt = let k s = - let t = Time.(to_string (of_tm ~zone (Unix.localtime t))) in + let t = Time_unix.(to_string (of_tm ~zone (Unix.localtime t))) in printf "[%s] %s\n%!" t s in ksprintf k fmt diff --git a/lib/utils/dune b/lib/utils/dune index 8a4df106..31efa47b 100644 --- a/lib/utils/dune +++ b/lib/utils/dune @@ -1,5 +1,5 @@ (library (name bistro_utils) (public_name bistro.utils) - (libraries base64 bistro.engine ocamlgraph tyxml) + (libraries base64 bistro.engine core_unix.time_unix ocamlgraph tyxml) (preprocess (pps ppx_bistro))) diff --git a/lib/utils/html_logger.ml b/lib/utils/html_logger.ml index 1600b3e1..297b4e1d 100644 --- a/lib/utils/html_logger.ml +++ b/lib/utils/html_logger.ml @@ -2,6 +2,8 @@ open Core open Bistro_internals open Bistro_engine +module Unix = Core_unix + type time = float type event = @@ -21,7 +23,7 @@ type model = { let ( >>= ) = Lwt.( >>= ) -let zone = Lazy.force Time.Zone.local +let zone = Lazy.force Time_unix.Zone.local type t = { path : string ; @@ -283,7 +285,7 @@ module Render = struct let event time evt = let table_line label details = [ - td [ k Time.(to_string_trimmed ~zone (of_tm ~zone (Unix.localtime time))) ] ; + td [ k Time_unix.(to_string_trimmed ~zone (of_tm ~zone (Unix.localtime time))) ] ; td [ label ] ; td details ] diff --git a/lib/utils/repo.ml b/lib/utils/repo.ml index d8a050b4..06abcd5c 100644 --- a/lib/utils/repo.ml +++ b/lib/utils/repo.ml @@ -4,6 +4,8 @@ open Bistro open Bistro_engine module W = Bistro_internals.Workflow +module Sys = Sys_unix +module Unix = Core_unix type item = | Item : string list * _ path workflow -> item diff --git a/ppx/bistro_script.ml b/ppx/bistro_script.ml index eccbf726..8e9f242a 100644 --- a/ppx/bistro_script.ml +++ b/ppx/bistro_script.ml @@ -245,7 +245,8 @@ let include_rewriter ~loc:_ ~path:_ { txt = fn ; loc } = let module Location = Ocaml_common.Location in let msg = Printf.sprintf - "Cannot read %s, have you forgot to add it in a preprocessor_deps field of your dune file?" + "Cannot read %s from %s, have you forgot to add it in a preprocessor_deps field of your dune file?" + (Stdlib.Sys.getcwd ()) fn in let err = Location.error ~loc msg in raise (Location.Error err)