ppxlib icon indicating copy to clipboard operation
ppxlib copied to clipboard

Make the ppxlib driver provide a consistent set of flags

Open mbarbin opened this issue 10 months ago • 0 comments

This issue is extracted from a discussion that happened in this dune issue: https://github.com/ocaml/dune/issues/10601

Quoting parts of this as it relates to ppxlib:

When trying to add a ppx driver flag systematically to all dune files in a repo, I ran into an issue where some instances of ppx drivers do not accept the same set of flags as in other directories. I am guessing this depends on which ppx are enabled in the (preprocess (pps ...)) stanza.

I created two PRs where I make use of the new flag unused-type-warnings (from a ppxlib preview package), one where it works, and one that exhibits the issue I am talking about, if you want to have a look.

  • ✅ https://github.com/mbarbin/error-log/pull/5
  • ❌ https://github.com/mbarbin/letfun/pull/1

@NathanReb made a conjecture that perhaps it would be possible to unify the set of flags provided by the driver:

Circling back to that, would fixing ppxlib's driver to provide a consistent set of flags, regardless of what ppx-es are being linked help toward having a simple variable to store ppx driver flags so one can set flags project wide?

I'm creating this issue to track further discussion on this topic as it relates to changes to ppxlib itself.

mbarbin avatar Feb 18 '25 15:02 mbarbin