Wrap vendored modules to avoid build conflicts#250
Conversation
|
It's good for me as far as it fixes the initial issue explained by #200 👍 . |
|
Thanks, this looks like a reasonable path forwards. I'm curious why gluten, h2, and paf are still vendored -- can't you just use the latest releases thereof? Removing vendored projects should ease the maintenance. For http/af I understand it hasn't seen a release in quite some while (and there's still inhabitedtype/httpaf#203 open). websocket/af don't know much about. Thanks for your work on dream and picking up the outstanding issues. |
h2 depends on http/af. An opam h2 will build against an opam http/af, but we need it to build against Dream's http/af. The same is true for paf. Gluten indeed can be used from opam, and before I settled on this approach I started a branch which unvendored it. But because everything else depends on http/af, it's the only library that can be taken out, and I decided that it's not worth it for the time being. In the past, Gluten was released less frequently and it was convenient (actually, necessary), to be able to point it to any commit. It's best to just keep this benefit for now, given that Gluten is directly related to all the other vendored libraries, and the very incremental benefit of unvendoring only Gluten. |
This FYI PR renames the vendored Gluten, http/af, h2, websocket/af, to
Dream_gluten, etc., to avoid conflicts with versions of these modules installed from opam.I took a different, much less invasive and much more maintainable approach to the renaming than in #200. I used that we replace all the
dunefiles of the vendored modules withsrc/vendor/duneto wrap e.g.GlutenasDream_gluten.Gluten, and then added module aliases at the top of each file that usedGluten, somodule Gluten = Dream_gluten.Gluten. This is in contrast to #200, which renamed theGlutentoDream_glutenthroughout the code in all the files, and renamed the files. I will check that this truly doesn't conflict with parallel installations of the "real"Gluten.I still have paf to rename afterwards, but it should go the same way as the other four libraries.
cc @clecat @anmonteiro @dinosaure @hannesm @TheLortex
Fixes #198.
Closes #200.