Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dune 3.6 language + mdx 0.3 stanza #3567

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions bin/bin/app.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
open Core
open Async
open Rwo
let (/) = Filename.concat

module Params = struct
open Command.Param
Expand All @@ -11,19 +10,6 @@ module Params = struct
let doc = sprintf "dir Root of repository. Default: \"%s\"." default in
flag "-repo-root" (optional_with_default default string) ~doc

let production =
let default = false in
let doc = sprintf
" Set to true to generate file for publication. Default \
is %b, which generates dev version of file."
default
in
flag "-production" (optional_with_default default bool) ~doc

let chapter =
let doc = "N Build HTML version of chapter N." in
flag "-chapter" (required int) ~doc

let out_dir =
let default = "_build" in
let doc = sprintf "DIR Output directory. Default: \"%s\"" default in
Expand All @@ -37,12 +23,6 @@ module Params = struct

let file =
anon ("file" %: string)

let run_nondeterministic =
flag "-run-nondeterministic" no_arg
~doc:" In .mlt files, run code marked [%%expect.nondeterministic ...]. \
By default, they are skipped."

end


Expand Down
3 changes: 0 additions & 3 deletions bin/bin/convert_md.ml
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ let pp_block_md ppf (b:Mdx.Block.t) =
let pp_text_html ppf l =
List.iter (Fmt.pf ppf "%s\n") (List.rev l)

let pp_text_md ppf l =
List.iter (Fmt.pf ppf "%s\n") (List.rev l)

open Astring

let pp_text_latex ppf l =
Expand Down
1 change: 1 addition & 0 deletions bin/examples-rules/examples_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ let print_rule ~dir_name ~path (config : Config.t) =
(alias %s)
(deps
(source_tree %s)%s)
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root %s")))

Expand Down
3 changes: 1 addition & 2 deletions book/classes/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(mdx
(files README.md)
(packages
(libraries
core
mdx
ppx_jane)
(preludes prelude.ml))
1 change: 1 addition & 0 deletions book/classes/examples/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
(package async)
(package async_kernel)
(package async_graphics))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/shapes")))

Expand Down
3 changes: 1 addition & 2 deletions book/command-line-parsing/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(mdx
(files README.md)
(packages
(libraries
core
mdx
ppx_jane)
(preludes prelude.ml))
15 changes: 15 additions & 0 deletions book/command-line-parsing/examples/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
(deps
(source_tree ./correct/cal_add_days)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/cal_add_days")))

Expand All @@ -17,6 +18,7 @@
(source_tree ./correct/cal_add_interactive)
(package core)
(package ppx_jane))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/cal_add_interactive")))

Expand All @@ -29,6 +31,7 @@
(deps
(source_tree ./correct/cal_add_interactive2)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/cal_add_interactive2")))

Expand All @@ -41,6 +44,7 @@
(deps
(source_tree ./correct/cal_add_sub_days)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/cal_add_sub_days")))

Expand All @@ -53,6 +57,7 @@
(deps
(source_tree ./correct/md5)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5")))

Expand All @@ -65,6 +70,7 @@
(deps
(source_tree ./correct/md5_as_filename)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_as_filename")))

Expand All @@ -77,6 +83,7 @@
(deps
(source_tree ./correct/md5_let_syntax)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_let_syntax")))

Expand All @@ -89,6 +96,7 @@
(deps
(source_tree ./correct/md5_let_syntax2)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_let_syntax2")))

Expand All @@ -101,6 +109,7 @@
(deps
(source_tree ./correct/md5_multiarg)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_multiarg")))

Expand All @@ -113,6 +122,7 @@
(deps
(source_tree ./correct/md5_sequence)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_sequence")))

Expand All @@ -125,6 +135,7 @@
(deps
(source_tree ./correct/md5_succinct)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_succinct")))

Expand All @@ -137,6 +148,7 @@
(deps
(source_tree ./correct/md5_with_custom_arg)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_with_custom_arg")))

Expand All @@ -149,6 +161,7 @@
(deps
(source_tree ./correct/md5_with_default_file)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_with_default_file")))

Expand All @@ -161,6 +174,7 @@
(deps
(source_tree ./correct/md5_with_flags)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_with_flags")))

Expand All @@ -173,6 +187,7 @@
(deps
(source_tree ./correct/md5_with_optional_file)
(package core))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/md5_with_optional_file")))

Expand Down
3 changes: 1 addition & 2 deletions book/compiler-backend/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
(mdx
(files README.md)
(packages
(libraries
core
mdx
ppx_jane)
(preludes prelude.ml))

Expand Down
3 changes: 1 addition & 2 deletions book/compiler-frontend/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
(mdx
(files README.md)
(packages
(libraries
core
mdx
ppx_jane)
(preludes prelude.ml))

Expand Down
5 changes: 3 additions & 2 deletions book/concurrent-programming/dune
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
(mdx
(files README.md)
(packages
(libraries
async
async_kernel
async_unix
cohttp-async
core
mdx
ppx_jane
textwrap
yojson)
Expand Down
10 changes: 10 additions & 0 deletions book/concurrent-programming/examples/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(source_tree ./correct/better_echo)
(package core)
(package async))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/better_echo")))

Expand All @@ -18,6 +19,7 @@
(source_tree ./correct/echo)
(package core)
(package async))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/echo")))

Expand All @@ -31,6 +33,7 @@
(source_tree ./correct/native_code_log_delays)
(package core)
(package async))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/native_code_log_delays")))

Expand All @@ -47,6 +50,7 @@
(package cohttp-async)
(package yojson)
(package textwrap))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/search")))

Expand All @@ -63,6 +67,7 @@
(package cohttp-async)
(package yojson)
(package textwrap))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/search_out_of_order")))

Expand All @@ -77,6 +82,7 @@
(package cohttp-async)
(package yojson)
(package textwrap))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/search_with_configurable_server")))

Expand All @@ -91,6 +97,7 @@
(package cohttp-async)
(package yojson)
(package textwrap))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/search_with_error_handling")))

Expand All @@ -107,6 +114,7 @@
(package cohttp-async)
(package yojson)
(package textwrap))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/search_with_timeout")))

Expand All @@ -121,6 +129,7 @@
(package cohttp-async)
(package yojson)
(package textwrap))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/search_with_timeout_no_leak")))

Expand All @@ -135,6 +144,7 @@
(package cohttp-async)
(package yojson)
(package textwrap))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/search_with_timeout_no_leak_simple")))

Expand Down
3 changes: 1 addition & 2 deletions book/data-serialization/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(mdx
(files README.md)
(packages
(libraries
core
mdx
ppx_jane)
(preludes prelude.ml))
5 changes: 5 additions & 0 deletions book/data-serialization/examples/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(source_tree ./correct/read_foo)
(package core)
(package sexplib))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/read_foo")))

Expand All @@ -18,6 +19,7 @@
(source_tree ./correct/read_foo_better_errors)
(package core)
(package sexplib))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/read_foo_better_errors")))

Expand All @@ -30,6 +32,7 @@
(deps
(source_tree ./correct/sexp)
(package base))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/sexp")))

Expand All @@ -43,6 +46,7 @@
(source_tree ./correct/test_interval)
(package core)
(package sexplib))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/test_interval")))

Expand All @@ -56,6 +60,7 @@
(source_tree ./correct/test_interval_override_of_sexp)
(package core)
(package sexplib))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/test_interval_override_of_sexp")))

Expand Down
3 changes: 1 addition & 2 deletions book/error-handling/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
(mdx
(files README.md)
(packages
(libraries
base
core
mdx
ppx_jane)
(preludes prelude.ml))
2 changes: 2 additions & 0 deletions book/error-handling/examples/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(source_tree ./correct/blow_up)
(package base)
(package stdio))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/blow_up")))

Expand All @@ -18,6 +19,7 @@
(source_tree ./correct/exn_cost)
(package core)
(package core_bench))
(locks /recursive-dune-run)
(action
(system "dune build @all @runtest --root ./correct/exn_cost")))

Expand Down
Loading