Skip to content

Commit

Permalink
Merge subtree logistic.
Browse files Browse the repository at this point in the history
  • Loading branch information
mefyl committed Apr 2, 2023
2 parents 4cbbea5 + e615ea3 commit 424bca8
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .logistic/dune/extdeps/extdeps.ml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ let () =
let rec rewrite ({ pelem = dep; _ } as item) =
if filter_doc_test dep then
match dep with
| String dep when List.mem ~equal:String.equal cross_exclude dep
->
None
| String dep when List.mem ~equal:String.equal cross_both dep ->
Some
[
Expand All @@ -364,9 +367,6 @@ let () =
| String dep
when List.mem ~equal:String.equal ("ocaml" :: cross) dep ->
Some [ { item with pelem = String (dep ^ "-ios") } ]
| String dep when List.mem ~equal:String.equal cross_exclude dep
->
None
| Option (value, options) ->
let+ values = rewrite value in
List.map values ~f:(fun value ->
Expand All @@ -393,13 +393,15 @@ let () =
_;
} as command) ->
let tail =
List.filter_map
~f:(function
| { pelem = Ident "name"; _ } as item ->
Some { item with pelem = String package }
| { pelem; _ } as item ->
Option.some_if (filter_doc_test pelem) item)
tail
{ pelem = String "-x"; pos = dune_command.pos }
:: { pelem = String "ios"; pos = dune_command.pos }
:: List.filter_map
~f:(function
| { pelem = Ident "name"; _ } as item ->
Some { item with pelem = String package }
| { pelem; _ } as item ->
Option.some_if (filter_doc_test pelem) item)
tail
in
Result.return
(List { command with pelem = dune :: dune_command :: tail })
Expand All @@ -420,7 +422,7 @@ let () =
{ pos with filename = path }
msg)
| Result.Error (None, msg) -> Result.Error msg
in
in
Term.(
const rewrite $ Arg.required input $ Arg.value cross_only
$ Arg.value cross_both $ Arg.value cross_exclude)
Expand Down

0 comments on commit 424bca8

Please sign in to comment.