ppx in META prevents using sedlex in libraries
In particular, if I distribute a library that depends on Sedlexing, adding requires = "sedlex" will also pull in -ppx ppx_sedlex, which is not what I want and will of course fail if the client is using camlp4.
I'm switching from ulex to sedlex, and this was the first major obstacle, which unfortunately is also a show-stopper. I agree with @whitequark: sedlex's META file is broken. The ppx directive should be part of a subpackage (I suggest calling it ppx), and the top-level sedlex package should contain only the runtime support.
Don't hesitate to suggest a specific patch or pull request. I assume that this is not just about moving the ppx directive to the ppx sub-package, which already exists but exposes the sedlex.cma library (containing the compile-time support, i.e. the code that goes into the ppx itself; this can be useful to build other tools that require the same functionality). So either this existing sub-package is renamed, or one settle on a new sedlex.syntax sub-package.
I've shared on the caml-list my thoughts on the way forward. I don't think we have anything approaching a consensus yet, but I would very much favour placing the 'sedlexing.cma' runtime at the META top-level and the ppx extension as a 'ppx' subpackage. As for 'sedlex.cma', perhaps it can placed in a 'tools' sub-package?
I guess this can be closed now, the camlp4 is dead, and if the project still uses it, it is advised to port to extension points anyway?
@XVilka What does this have to do with camlp4?
@pmetzger
will of course fail if the client is using camlp4.
Ah.
I think this should be closed