Skip to content

Commit

Permalink
merlin: pass all flags at once
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Chavarri <[email protected]>
  • Loading branch information
jchavarri committed Nov 30, 2022
1 parent 9bc6c7d commit 8bacbb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/dune_rules/merlin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,7 @@ module Unprocessed = struct
| Error _ -> []
| Ok path ->
[ Processed.Pp_kind.to_flag Ppx
; Processed.serialize_path path
; "-as-ppx"
; "-bs-jsx"
; "3"
; Processed.serialize_path path ^ " -as-ppx -bs-jsx 3"
])
in
{ Processed.stdlib_dir
Expand Down
10 changes: 5 additions & 5 deletions test/blackbox-tests/test-cases/melange/merlin.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
All 3 entries (Foo, Foo__ and Bar) contain a ppx directive

$ dune ocaml merlin dump-config $PWD | grep -i "ppx"
(FLG (-ppx /MELC_COMPILER -as-ppx -bs-jsx 3))
(FLG (-ppx /MELC_COMPILER -as-ppx -bs-jsx 3))
(FLG (-ppx /MELC_COMPILER -as-ppx -bs-jsx 3))
(FLG (-ppx "/MELC_COMPILER -as-ppx -bs-jsx 3"))
(FLG (-ppx "/MELC_COMPILER -as-ppx -bs-jsx 3"))
(FLG (-ppx "/MELC_COMPILER -as-ppx -bs-jsx 3"))

$ target=output
$ cat >dune <<EOF
Expand All @@ -53,13 +53,13 @@ All 3 entries (Foo, Foo__ and Bar) contain a ppx directive
The melange.emit entry contains a ppx directive

$ dune ocaml merlin dump-config $PWD | grep -i "ppx"
(FLG (-ppx /MELC_COMPILER -as-ppx -bs-jsx 3))
(FLG (-ppx "/MELC_COMPILER -as-ppx -bs-jsx 3"))

$ dune ocaml dump-dot-merlin $PWD
EXCLUDE_QUERY_DIR
STDLIB /MELC_WHERE
B $TESTCASE_ROOT/_build/default/.output.mobjs/melange
S $TESTCASE_ROOT
# FLG -ppx /MELC_COMPILER -as-ppx -bs-jsx 3
# FLG -ppx '/MELC_COMPILER -as-ppx -bs-jsx 3'
# FLG -w @[email protected]@30..39@[email protected]@[email protected]@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs

0 comments on commit 8bacbb7

Please sign in to comment.