Open jberdine opened 4 years ago
This indeed looks like a bug. Combining ppx rewriters this way is indeed the intended way to name sets of ppx rewriters. That's way ppx_jane does for instance
But if I wrap it into another rewriter, such as:
Is this still allowed? I thought we only allow to pass rewriters in preprocess
now.
In case it is useful when looking at old issues, this still is an issue with dune 3.8.0.
Actual Behavior
If I have a ppx_rewriter such as:
Then I can invoke it using
(preprocess (pps ppx_trace))
in e.g.library
stanzas.But if I wrap it into another rewriter, such as:
Then using
(preprocess (pps ppx_combined))
in other stanzas performs the rewriting, but does not pass the cookie.(FWIW, the purpose of the
ppx_combined
rewriter is just to deduplicate the list of rewriters that appears numerous times. Maybe there is an easier/better way to name a list of rewriters?)Expected Behavior
I did not expect that wrapping
ppx_trace
inppx_combined
would influence the cookie passing specified in the stanza defining theppx_trace
rewriter.I can try to boil down a repro, but wanted to ask if this is actually intended behavior before spending the time.