Repository navigation
Begin factoring out the PPX - #481
Merged
Merged
Conversation
Collaborator
Author
|
I guess we could try duplicating the PPX in both |
aantron
force-pushed
the
ppx-packaging
branch
from
October 13, 2017 20:28
c204835 to
86688b1
Compare
This commit creates a new opam package lwt_ppx, and a new Findlib package of the same name. This Findlib package will replace lwt.ppx, from existing opam package lwt. For now, lwt_ppx is just an alias for lwt.ppx, so that users have several months to gently switch over. There is one defect: with ocamlfind and Ocamlbuild, PPX options have to be passed to lwt.ppx, not lwt_ppx. When the switchover is complete, uses will suddenly have to pass options to lwt_ppx. This is not a problem when using Jbuilder and/or a PPX driver.
aantron
force-pushed
the
ppx-packaging
branch
from
October 14, 2017 03:11
86688b1 to
2377b78
Compare
Member
|
Applying a ppx twice shouldn't be an issue, it should be idempotent. How do you handle ppx.log ? |
Collaborator
Author
|
There is no |
aantron
added a commit
that referenced
this pull request
Nov 7, 2017
Lwt is factoring out the PPX as package lwt_ppx. We are currently in an intermediate state, where lwt.ppx still exists as a subpackage of lwt, but there is also lwt_ppx. Before this commit, lwt_ppx was an alias for lwt.ppx. An unpleasant side effect of this was that with ocamlfind, options passed to lwt_ppx were not forwarded to lwt.ppx. This commit instead packages the PPX independently in both lwt.ppx and lwt_ppx. Options passed to lwt_ppx are consumed by lwt_ppx as one would expect. This dual packaging causes Findlib warnings about duplicate interface ppx_lwt.cmi in packages lwt (lwt.ppx) and lwt_ppx. This shouldn't cause problems in practice, since we expect each separate build process to always use exactly one of lwt.ppx and lwt_ppx. The warnings should disppear when lwt.ppx is eliminated. Resolves #486. See #338, #481.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discussed in #338.
This is pretty much following our "normal" procedure:
lwt_ppx, containing a Findlib packagelwt_ppx, which is a proxy for the currentlwt.ppx(which is in opam packagelwt). We will release the commit as part of 3.2.0, and announce the upcoming change.lwt.ppxand move the PPX fully tolwt_ppx.There is one flaw: even when using
lwt_ppx, PPX options still have to be passed tolwt.ppx, not tolwt_ppx. Once 4.0.0 lands, they will suddenly have to be passed tolwt_ppx. This applies only to ocamlfind and tools that use it (like Ocamlbuild). Jbuilder, or any other build tool that runs the PPX as a library linked into a driver, will handle options correctly. I looked through opam users of Lwt, and only sqlexpr seems to uselwt.ppxoptions, in itsREADMEand a test (cc @mfp). So, we can hope that this breakage in 4.0.0 won't be too bad.