Skip to content

Commit

Permalink
fix(ppx): mark @@@mel.config used in interface files too
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Oct 20, 2023
1 parent 5c41955 commit 7c5691a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 8 additions & 0 deletions ppx/melange_ppx.ml
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,14 @@ module Mapper = struct
:: pval_attributes;
};
})
| Psig_attribute
({
(* TODO: remove support for bs.* *)
attr_name = { txt = "bs.config" | "mel.config" | "config"; _ };
_;
} as attr) ->
Bs_ast_invariant.mark_used_bs_attribute attr;
sigi
| _ -> super#signature_item sigi
end
end
Expand Down
7 changes: 0 additions & 7 deletions test/blackbox-tests/unused-attributes.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,3 @@
> [@@@mel.config { flags = [|"-unboxed-types"|] }]
> EOF
$ melc -ppx melppx x.mli
File "x.mli", line 1, characters 6-16:
1 | [@@@mel.config { flags = [|"-unboxed-types"|] }]
^^^^^^^^^^
Alert unused: Unused attribute [@mel.config]
This means such annotation is not annotated properly.
For example, some annotations are only meaningful in externals

0 comments on commit 7c5691a

Please sign in to comment.