Hello community, here is the log from the commit of package ocaml-dune for openSUSE:Factory checked in at 2019-02-25 17:58:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ocaml-dune (Old) and /work/SRC/openSUSE:Factory/.ocaml-dune.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocaml-dune" Mon Feb 25 17:58:45 2019 rev:4 rq:678850 version:1.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ocaml-dune/ocaml-dune.changes 2019-02-19 12:03:21.945046295 +0100 +++ /work/SRC/openSUSE:Factory/.ocaml-dune.new.28833/ocaml-dune.changes 2019-02-25 17:58:50.354208849 +0100 @@ -1,0 +2,15 @@ +Sat Feb 23 19:12:52 UTC 2019 - a...@onthewings.net + +- Update to version 1.7.2: + * Add ${corrected-suffix}, ${library-name} and a few other + variables to the list of variables to upgrade. + * Fix "dune subst" failing because the build directory was not + set. + * Configurator: Add warning to Pkg_config.query when a full + package expression is used. Add Pkg_config.query_expr for cases + when the full power of pkg-config's querying is needed. + * Fix unavailable, optional implementations eagerly breaking the + build. +- Update Url to https://dune.build/. + +------------------------------------------------------------------- Old: ---- ocaml-dune-1.7.1.tar.xz New: ---- ocaml-dune-1.7.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ocaml-dune.spec ++++++ --- /var/tmp/diff_new_pack.DJoahD/_old 2019-02-25 17:58:51.022208197 +0100 +++ /var/tmp/diff_new_pack.DJoahD/_new 2019-02-25 17:58:51.022208197 +0100 @@ -17,13 +17,13 @@ Name: ocaml-dune -Version: 1.7.1 +Version: 1.7.2 Release: 0 %{?ocaml_preserve_bytecode} Summary: A composable build system for OCaml License: MIT Group: Development/Languages/OCaml -Url: https://github.com/ocaml/dune +Url: https://dune.build/ Conflicts: ocaml-jbuilder Conflicts: ocaml-jbuilder-debuginfo Conflicts: ocaml-jbuilder-debugsource ++++++ _service ++++++ --- /var/tmp/diff_new_pack.DJoahD/_old 2019-02-25 17:58:51.058208161 +0100 +++ /var/tmp/diff_new_pack.DJoahD/_new 2019-02-25 17:58:51.062208158 +0100 @@ -3,7 +3,7 @@ <param name="url">git://github.com/ocaml/dune.git</param> <param name="scm">git</param> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">1.7.1</param> + <param name="revision">1.7.2</param> <param name="filename">ocaml-dune</param> </service> <service name="recompress" mode="disabled"> ++++++ ocaml-dune-1.7.1.tar.xz -> ocaml-dune-1.7.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/CHANGES.md new/ocaml-dune-1.7.2/CHANGES.md --- old/ocaml-dune-1.7.1/CHANGES.md 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/CHANGES.md 2019-02-21 06:56:14.000000000 +0100 @@ -1,3 +1,21 @@ +1.7.2 (21/02/2019) +------------------ + +- Add `${corrected-suffix}`, `${library-name}` and a few other + variables to the list of variables to upgrade. This fixes the + support for various framework producing corrections (#1840, #1853, + @diml) + +- Fix `$ dune subst` failing because the build directory wasn't set. (#1854, fix + #1846, @rgrinberg) + +- Configurator: Add warning to `Pkg_config.query` when a full package expression + is used. Add `Pkg_config.query_expr` for cases when the full power of + pkg-config's querying is needed (#1842, fix #1833, @rgrinberg) + +- Fix unavailable, optional implementations eagerly breaking the build (#1857, + fix #1856, @rgrinberg) + 1.7.1 (13/02/2019) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/bin/common.ml new/ocaml-dune-1.7.2/bin/common.ml --- old/ocaml-dune-1.7.1/bin/common.ml 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/bin/common.ml 2019-02-21 06:56:14.000000000 +0100 @@ -87,6 +87,8 @@ | Default | This of Path.t +let default_build_dir = "_build" + let term = let incompatible a b = `Error (true, @@ -358,7 +360,7 @@ ~env:(Arg.env_var ~doc "DUNE_STORE_ORIG_SOURCE_DIR") ~doc) in - let build_dir = Option.value ~default:"_build" build_dir in + let build_dir = Option.value ~default:default_build_dir build_dir in let root, to_cwd = match root with | Some dn -> (dn, []) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/bin/common.mli new/ocaml-dune-1.7.2/bin/common.mli --- old/ocaml-dune-1.7.1/bin/common.mli 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/bin/common.mli 2019-02-21 06:56:14.000000000 +0100 @@ -43,3 +43,5 @@ val term : t Cmdliner.Term.t val context_arg : doc:string -> string Cmdliner.Term.t + +val default_build_dir : string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/bin/subst.ml new/ocaml-dune-1.7.2/bin/subst.ml --- old/ocaml-dune-1.7.1/bin/subst.ml 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/bin/subst.ml 2019-02-21 06:56:14.000000000 +0100 @@ -69,6 +69,7 @@ } in Path.set_root (Path.External.cwd ()); + Path.set_build_dir (Path.Kind.of_string Common.default_build_dir); Dune.Scheduler.go ~config Watermarks.subst let command = term, info diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/doc/foreign-code.rst new/ocaml-dune-1.7.2/doc/foreign-code.rst --- old/ocaml-dune-1.7.1/doc/foreign-code.rst 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/doc/foreign-code.rst 2019-02-21 06:56:14.000000000 +0100 @@ -146,5 +146,5 @@ The `re2 project <https://github.com/janestreet/re2>`_ uses this method to build the re2 C library. You can look at the file -``re2/src/re2_c/jbuild`` in this project to see a full working +``re2/src/re2_c/dune`` in this project to see a full working example. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/src/configurator/v1.ml new/ocaml-dune-1.7.2/src/configurator/v1.ml --- old/ocaml-dune-1.7.1/src/configurator/v1.ml 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/src/configurator/v1.ml 2019-02-21 06:56:14.000000000 +0100 @@ -17,6 +17,11 @@ raise (Fatal_error s); ) fmt +let warn fmt = + Printf.ksprintf (fun msg -> + prerr_endline ("Warning: " ^ msg)) + fmt + type t = { name : string ; dest_dir : string @@ -152,6 +157,60 @@ let command_line prog args = String.concat ~sep:" " (List.map (prog :: args) ~f:quote_if_needed) + let run_process t ?dir ?env prog args = + let prog_command_line = command_line prog args in + logf t "run: %s" prog_command_line; + let n = gen_id t in + let create_process = + let args = Array.of_list (prog :: args) in + match env with + | None -> Unix.create_process prog args + | Some env -> + let env = Array.of_list env in + Unix.create_process_env prog args env + in + let stdout_fn = t.dest_dir ^/ sprintf "stdout-%d" n in + let stderr_fn = t.dest_dir ^/ sprintf "stderr-%d" n in + let status = + let run () = + let openfile f = + Unix.openfile f [O_WRONLY; O_CREAT; O_TRUNC; O_SHARE_DELETE] 0o666 + in + let stdout = openfile stdout_fn in + let stderr = openfile stderr_fn in + let (stdin, stdin_w) = Unix.pipe () in + Unix.close stdin_w; + let p = create_process stdin stdout stderr in + Unix.close stdin; + Unix.close stdout; + Unix.close stderr; + let (_pid, status) = Unix.waitpid [] p in + status + in + match dir with + | None -> run () + | Some d -> + let old_dir = Sys.getcwd () in + Exn.protect ~f:(fun () -> + Sys.chdir d; + run ()) + ~finally:(fun () -> Sys.chdir old_dir) + in + match status with + | Unix.WSIGNALED signal -> + die "signal %d killed process: %s" signal prog_command_line + | WSTOPPED signal -> + die "signal %d stopped process: %s" signal prog_command_line + | WEXITED exit_code -> + logf t "-> process exited with code %d" exit_code; + let stdout = Io.read_file stdout_fn in + let stderr = Io.read_file stderr_fn in + logf t "-> stdout:"; + List.iter (String.split_lines stdout) ~f:(logf t " | %s"); + logf t "-> stderr:"; + List.iter (String.split_lines stderr) ~f:(logf t " | %s"); + { exit_code; stdout; stderr } + (* [cmd] which cannot be quoted (such as [t.c_compiler] which contains some flags) followed by additional arguments. *) let command_args cmd args = @@ -197,6 +256,9 @@ let run_command_ok t ?dir ?env cmd = (run_command t ?dir ?env cmd).exit_code = 0 + let run_process_ok t ?dir ?env prog args = + (run_process t ?dir ?env prog args).exit_code = 0 + let run t ?dir ?env prog args = run_command t ?dir ?env (command_line prog args) @@ -205,7 +267,6 @@ let run_ok t ?dir ?env prog args = run_command_ok t ?dir ?env (command_line prog args) - end let get_ocaml_config_var_exn ~ocamlc_config_cmd map var = @@ -509,27 +570,54 @@ ; cflags : string list } - let query t ~package = + let gen_query t ~package ~expr = let c = t.configurator in let dir = c.dest_dir in + let expr = + match expr with + | Some e -> e + | None -> + begin + if String.exists package + ~f:(function '=' | '>' | '<' -> true | _ -> false) + then + warn "Package name %S contains invalid characters. \ + Use Pkg_config.query_expr to construct proper queries" + package + end; + package + in let env = match ocaml_config_var c "system" with | Some "macosx" -> begin - match which c "brew" with - | Some brew -> - let prefix = - String.trim (Process.run_capture_exn c ~dir brew ["--prefix"]) - in - [sprintf "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:%s/opt/%s/lib/pkgconfig" - (quote_if_needed prefix) package] - | None -> - [] + let open Option.O in + which c "brew" >>= fun brew -> + (let prefix = + String.trim (Process.run_capture_exn c ~dir brew ["--prefix"]) + in + let p = sprintf "%s/opt/%s/lib/pkgconfig" + (quote_if_needed prefix) package + in + Option.some_if ( + match Sys.is_directory p with + | s -> s + | exception Sys_error _ -> false) + p) + >>| fun new_pkg_config_path -> + let _PKG_CONFIG_PATH = "PKG_CONFIG_PATH" in + let pkg_config_path = + match Sys.getenv _PKG_CONFIG_PATH with + | s -> s ^ ":" + | exception Not_found -> "" + in + [sprintf "%s=%s%s" + _PKG_CONFIG_PATH pkg_config_path new_pkg_config_path] end - | _ -> [] + | _ -> None in - if Process.run_ok c ~dir ~env t.pkg_config [package] then + if Process.run_process_ok c ~dir ?env t.pkg_config [expr] then let run what = - match String.trim (Process.run_capture_exn c ~dir ~env + match String.trim (Process.run_capture_exn c ~dir ?env t.pkg_config [what; package]) with | "" -> [] @@ -541,6 +629,9 @@ } else None + + let query t ~package = gen_query t ~package ~expr:None + let query_expr t ~package ~expr = gen_query t ~package ~expr:(Some expr) end let main ?(args=[]) ~name f = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/src/configurator/v1.mli new/ocaml-dune-1.7.2/src/configurator/v1.mli --- old/ocaml-dune-1.7.1/src/configurator/v1.mli 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/src/configurator/v1.mli 2019-02-21 06:56:14.000000000 +0100 @@ -92,6 +92,8 @@ (** [query t ~package] query pkg-config for the [package]. The package may contain a version constraint. For example "gtk+-3.0 >= 3.18". Returns [None] if [package] is not available *) + + val query_expr : t -> package:string -> expr:string -> package_conf option end with type configurator := t module Flags : sig diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/src/dir_contents.ml new/ocaml-dune-1.7.2/src/dir_contents.ml --- old/ocaml-dune-1.7.1/src/dir_contents.ml 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/src/dir_contents.ml 2019-02-21 06:56:14.000000000 +0100 @@ -52,11 +52,18 @@ | From _, From _ -> let name = (fst lib.name, Library.best_name lib) in Result.ok_exn ( - let open Result.O in - Lib.DB.resolve (Scope.libs scope) name >>= fun lib -> - Lib.main_module_name lib >>= fun main_module_name -> - Lib.wrapped lib >>| fun wrapped -> - (main_module_name, Option.value_exn wrapped) + match + Lib.DB.find_even_when_hidden (Scope.libs scope) (snd name) + with + | None -> + (* can't happen because this library is defined using the + current stanza *) + assert false + | Some lib -> + let open Result.O in + Lib.main_module_name lib >>= fun main_module_name -> + Lib.wrapped lib >>| fun wrapped -> + (main_module_name, Option.value_exn wrapped) ) in Left ( lib diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/src/stdune/string.ml new/ocaml-dune-1.7.2/src/stdune/string.ml --- old/ocaml-dune-1.7.1/src/stdune/string.ml 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/src/stdune/string.ml 2019-02-21 06:56:14.000000000 +0100 @@ -258,3 +258,14 @@ ( sub s ~pos:0 ~len:n , sub s ~pos:n ~len:(len - n) ) + +let findi = + let rec loop s len ~f i = + if i >= len then + None + else if f (String.unsafe_get s i) then + Some i + else + loop s len ~f (i + 1) + in + fun s ~f -> loop s (String.length s) ~f 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/src/stdune/string.mli new/ocaml-dune-1.7.2/src/stdune/string.mli --- old/ocaml-dune-1.7.1/src/stdune/string.mli 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/src/stdune/string.mli 2019-02-21 06:56:14.000000000 +0100 @@ -65,6 +65,9 @@ (** Produces: "One of x, y or z" *) val enumerate_one_of : t list -> t +(** Find index of first character satisfying [f] *) +val findi : string -> f:(char -> bool) -> int option + module Set : sig include Set.S with type elt = t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/src/string_with_vars.ml new/ocaml-dune-1.7.2/src/string_with_vars.ml --- old/ocaml-dune-1.7.1/src/string_with_vars.ml 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/src/string_with_vars.ml 2019-02-21 06:56:14.000000000 +0100 @@ -386,6 +386,10 @@ ; "workspace_root" , Keep ; "context_name" , Keep ; "ROOT" , Renamed_to "workspace_root" + ; "corrected-suffix", Keep + ; "library-name" , Keep + ; "impl-files" , Keep + ; "intf-files" , Keep ] in String.Map.of_list_exn diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/dune.inc new/ocaml-dune-1.7.2/test/blackbox-tests/dune.inc --- old/ocaml-dune-1.7.1/test/blackbox-tests/dune.inc 2019-02-13 12:30:49.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/dune.inc 2019-02-21 06:56:14.000000000 +0100 @@ -152,6 +152,14 @@ (progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))) (alias + (name dir-target-dep) + (deps (package dune) (source_tree test-cases/dir-target-dep)) + (action + (chdir + test-cases/dir-target-dep + (progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))) + +(alias (name double-echo) (deps (package dune) (source_tree test-cases/double-echo)) (action @@ -512,6 +520,14 @@ (progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))) (alias + (name github1856) + (deps (package dune) (source_tree test-cases/github1856)) + (action + (chdir + test-cases/github1856 + (progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))) + +(alias (name github20) (deps (package dune) (source_tree test-cases/github20)) (action @@ -963,6 +979,14 @@ (progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))) (alias + (name pkg-config-quoting) + (deps (package dune) (source_tree test-cases/pkg-config-quoting)) + (action + (chdir + test-cases/pkg-config-quoting + (progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))) + +(alias (name ppx-rewriter) (deps (package dune) (source_tree test-cases/ppx-rewriter)) (action @@ -1282,6 +1306,7 @@ (alias depend-on-the-universe) (alias deps-conf-vars) (alias dev-flag-1103) + (alias dir-target-dep) (alias double-echo) (alias dune-build-dir-exec-1101) (alias dune-jbuild-var-case) @@ -1326,6 +1351,7 @@ (alias github1560) (alias github1616) (alias github1811) + (alias github1856) (alias github20) (alias github24) (alias github25) @@ -1379,6 +1405,7 @@ (alias output-obj) (alias package-dep) (alias path-variables) + (alias pkg-config-quoting) (alias ppx-rewriter) (alias preprocess-with-action) (alias private-modules) @@ -1438,6 +1465,7 @@ (alias depend-on-the-universe) (alias deps-conf-vars) (alias dev-flag-1103) + (alias dir-target-dep) (alias double-echo) (alias dune-build-dir-exec-1101) (alias dune-jbuild-var-case) @@ -1480,6 +1508,7 @@ (alias github1560) (alias github1616) (alias github1811) + (alias github1856) (alias github20) (alias github24) (alias github25) @@ -1527,6 +1556,7 @@ (alias output-obj) (alias package-dep) (alias path-variables) + (alias pkg-config-quoting) (alias preprocess-with-action) (alias private-modules) (alias project-root) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/dep/dir/bar new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/dep/dir/bar --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/dep/dir/bar 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/dep/dir/bar 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1 @@ +in bar \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/dep/dir/foo new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/dep/dir/foo --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/dep/dir/foo 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/dep/dir/foo 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1 @@ +in foo \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/dep/dune new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/dep/dune --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/dep/dune 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/dep/dune 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,4 @@ +(alias + (name default) + (deps dir) + (action (bash "cat %{deps}/*"))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/dep/dune-project new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/dep/dune-project --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/dep/dune-project 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/dep/dune-project 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1 @@ +(lang dune 1.6) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/run.t new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/run.t --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/run.t 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/run.t 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,14 @@ + $ dune build --root target && cat target/_build/default/dir/* + Entering directory 'target' + bar contents + foo contents + + $ dune build --root dep + Entering directory 'dep' + File "dune", line 1, characters 0-68: + 1 | (alias + 2 | (name default) + 3 | (deps dir) + 4 | (action (bash "cat %{deps}/*"))) + Error: No rule found for dir + [1] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/target/dune new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/target/dune --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/target/dune 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/target/dune 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,11 @@ +(executable + (name foo) + (libraries unix)) + +(rule + (targets dir) + (action (run ./foo.exe dir))) + +(alias + (name default) + (deps dir)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/target/dune-project new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/target/dune-project --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/target/dune-project 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/target/dune-project 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1 @@ +(lang dune 1.6) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/target/foo.ml new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/target/foo.ml --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/dir-target-dep/target/foo.ml 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/dir-target-dep/target/foo.ml 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,12 @@ +let dir = Sys.argv.(1) + +let write f = + let path = Filename.concat dir f in + let out = open_out path in + output_string out (f ^ " contents\n"); + close_out_noerr out + +let () = + Unix.mkdir dir 0o777; + write "foo"; + write "bar" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/github1856/dune-project new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/github1856/dune-project --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/github1856/dune-project 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/github1856/dune-project 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1 @@ +(lang dune 1.7) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/github1856/impl/dune new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/github1856/impl/dune --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/github1856/impl/dune 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/github1856/impl/dune 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,6 @@ +(library + (name foo_impl) + (public_name foo.impl) + (implements foo) + (libraries dontexist) + (optional)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/github1856/run.t new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/github1856/run.t --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/github1856/run.t 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/github1856/run.t 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,2 @@ +Optional implementation of virtual library + $ dune build @install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/github1856/vlib/dune new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/github1856/vlib/dune --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/github1856/vlib/dune 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/github1856/vlib/dune 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,4 @@ +(library + (name foo) + (public_name foo) + (virtual_modules foo)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/config_test.ml new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/config_test.ml --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/config_test.ml 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/config_test.ml 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,15 @@ +module C = Configurator.V1 + + +let () = + C.main ~name:"config_test" (fun t -> + let pkg_config = + match C.Pkg_config.get t with + | None -> assert false + | Some p -> p + in + let query package = ignore (C.Pkg_config.query pkg_config ~package) in + query "gtk+-quartz-3.0"; + query "gtk+-quartz-3.0 >= 3.18"; + query "gtksourceview-3.0 >= 3.18" + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/dune new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/dune --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/dune 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/dune 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,14 @@ +(executable + (name pkg_config) + (public_name pkg-config) + (modules pkg_config)) + +(executable + (name config_test) + (libraries dune.configurator) + (modules config_test)) + +(alias + (name default) + (deps (package pkg-config)) + (action (run ./config_test.exe -verbose))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/dune-project new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/dune-project --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/dune-project 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/dune-project 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1 @@ +(lang dune 1.7) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/pkg_config.ml new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/pkg_config.ml --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/pkg_config.ml 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/pkg_config.ml 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,4 @@ +let () = + let args = List.tl (Array.to_list Sys.argv) in + Format.printf "%a@." + (Format.pp_print_list Format.pp_print_string) args diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/run.t new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/run.t --- old/ocaml-dune-1.7.1/test/blackbox-tests/test-cases/pkg-config-quoting/run.t 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-dune-1.7.2/test/blackbox-tests/test-cases/pkg-config-quoting/run.t 2019-02-21 06:56:14.000000000 +0100 @@ -0,0 +1,44 @@ +These tests show how various pkg-config invocations get qouted: + $ dune build 2>&1 | awk '/run:.*bin\/pkg-config/{a=1}/stderr/{a=0}a' + run: $TESTCASE_ROOT/_build/install/default/bin/pkg-config gtk+-quartz-3.0 + -> process exited with code 0 + -> stdout: + | gtk+-quartz-3.0 + run: $TESTCASE_ROOT/_build/install/default/bin/pkg-config --cflags gtk+-quartz-3.0 + -> process exited with code 0 + -> stdout: + | --cflags + | gtk+-quartz-3.0 + run: $TESTCASE_ROOT/_build/install/default/bin/pkg-config --libs gtk+-quartz-3.0 + -> process exited with code 0 + -> stdout: + | --libs + | gtk+-quartz-3.0 + run: $TESTCASE_ROOT/_build/install/default/bin/pkg-config 'gtk+-quartz-3.0 >= 3.18' + -> process exited with code 0 + -> stdout: + | gtk+-quartz-3.0 >= 3.18 + run: $TESTCASE_ROOT/_build/install/default/bin/pkg-config --cflags 'gtk+-quartz-3.0 >= 3.18' + -> process exited with code 0 + -> stdout: + | --cflags + | gtk+-quartz-3.0 >= 3.18 + run: $TESTCASE_ROOT/_build/install/default/bin/pkg-config --libs 'gtk+-quartz-3.0 >= 3.18' + -> process exited with code 0 + -> stdout: + | --libs + | gtk+-quartz-3.0 >= 3.18 + run: $TESTCASE_ROOT/_build/install/default/bin/pkg-config 'gtksourceview-3.0 >= 3.18' + -> process exited with code 0 + -> stdout: + | gtksourceview-3.0 >= 3.18 + run: $TESTCASE_ROOT/_build/install/default/bin/pkg-config --cflags 'gtksourceview-3.0 >= 3.18' + -> process exited with code 0 + -> stdout: + | --cflags + | gtksourceview-3.0 >= 3.18 + run: $TESTCASE_ROOT/_build/install/default/bin/pkg-config --libs 'gtksourceview-3.0 >= 3.18' + -> process exited with code 0 + -> stdout: + | --libs + | gtksourceview-3.0 >= 3.18