Skip to content
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

obazl v2 migration: ppx rules #10

Open
mobileink opened this issue Oct 5, 2021 · 2 comments
Open

obazl v2 migration: ppx rules #10

mobileink opened this issue Oct 5, 2021 · 2 comments

Comments

@mobileink
Copy link
Collaborator

All ppx rules except for ppx_executable have been removed in version 2.

The original motivation for the ppx rules was to enforce a kind of type discipline, ie. a ppx_executable could only depend on ppx_module etc. I subsequently learned that doesn't make sense, since any module may be a dep of a ppx executable. So there's no point to having a parallel set of rules for ppx, as there is not real distinction (from a build perspective) between them.

The only exception is ppx_executable. We need to keep that distinct from ocaml_executable because it does indeed play a different role in the ecosystem. In particular it is the bearer of ppx_codeps - dependencies it injects into the files it transforms. It passes those deps on so they will be inputs when the transformed output is compiled. (Which works because the ppx transform action is part of the ocaml compile rules.)

This should be an easy change for okapi, just change ppx_module to ocaml_module, etc.

@tek
Copy link
Member

tek commented Oct 5, 2021

great!

@mobileink
Copy link
Collaborator Author

also attr deps_opam has been renamed ppx_codeps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants