Skip to content

Commit

Permalink
Fix generation of the ppx key for jbuild directories (#860)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
  • Loading branch information
jeremiedimino authored Jun 6, 2018
1 parent ec6ca4b commit 0fafebe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/preprocessing.ml
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,13 @@ let gen_rules sctx components =

let ppx_driver_exe sctx libs ~dir_kind =
let names =
List.rev_map libs ~f:Lib.name
|> List.sort ~compare:String.compare
let names = List.rev_map libs ~f:Lib.name in
match (dir_kind : File_tree.Dune_file.Kind.t) with
| Dune -> List.sort names ~compare:String.compare
| Jbuild ->
match names with
| last :: others -> List.sort others ~compare:String.compare @ [last]
| [] -> []
in
let scope_for_key =
List.fold_left libs ~init:None ~f:(fun acc lib ->
Expand Down

0 comments on commit 0fafebe

Please sign in to comment.