-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace CPPO with µCPPO #175
Replace CPPO with µCPPO #175
Conversation
34e6373
to
89f22f1
Compare
Just a small comment: If the goal is to remove dependencies, an alternative approach would have been to make the preprocessed output "promoted" in the tree, and directly used when installing through opam. So that (even if we kept using cppo) we could move cppo from the build dependencies to the test dependencies. We used to have this in odoc: we use ocaml-crunch to generate a module from static files, promoted the result and did not include ocaml-crunch to the dependencies. See the dune file at that time. We now more simply include (But your approach is also valid of course!) |
I used such an approach in xml2js to allow people to use the generated source without the CoffeeScript compiler, the issues with this are twofold:
In the long end, my goal would be to get rid of all variants but In the end this is just a small step which removes a (in the grand scheme of things) small dependency, it doesn't preclude any further improvements in the future as you suggest :-) |
This removes a build dependency and replaces the conditional compilation with a tool vendored and used at compile time. mucppo is marked as vendored since it should just be copied from upstream and not modified in-tree.
89f22f1
to
a6c4370
Compare
11fe582
into
ocaml-community:master
CHANGES: *2024-05-31* ### Added - Added support for JSON5 (@dhilst, @gorm-issuu, @gertsonderby, ocaml-community/yojson#152) ### Removed - Remove CPPO dependency to make the Yojson installation lighter (@Leonidas-from-XIV, ocaml-community/yojson#175)
CHANGES: *2024-05-31* ### Added - Added support for JSON5 (@dhilst, @gorm-issuu, @gertsonderby, ocaml-community/yojson#152) ### Removed - Remove CPPO dependency to make the Yojson installation lighter (@Leonidas-from-XIV, ocaml-community/yojson#175)
This removes a build dependency and replaces the conditional compilation with a mucppo, a CPPO subset meant for embedding in builds: https://github.com/Leonidas-from-XIV/mucppo
The advantage is that it sheds another dependency from Yojson and given it is only needed at compile time, the tool is quickly built (as it is a single file) and never installed into the users switch.