sedlex icon indicating copy to clipboard operation
sedlex copied to clipboard

ppx in META prevents using sedlex in libraries

Open whitequark opened this issue 11 years ago • 7 comments

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.

whitequark avatar Dec 11 '14 10:12 whitequark

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.

darioteixeira avatar Apr 08 '15 17:04 darioteixeira

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.

alainfrisch avatar Apr 09 '15 08:04 alainfrisch

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?

darioteixeira avatar Apr 09 '15 10:04 darioteixeira

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 avatar Aug 04 '19 03:08 XVilka

@XVilka What does this have to do with camlp4?

pmetzger avatar Aug 04 '19 12:08 pmetzger

@pmetzger

will of course fail if the client is using camlp4.

XVilka avatar Aug 04 '19 12:08 XVilka

Ah.

pmetzger avatar Aug 06 '19 17:08 pmetzger

I think this should be closed

hhugo avatar Feb 17 '23 14:02 hhugo