dream icon indicating copy to clipboard operation
dream copied to clipboard

Prefix vendored libraries

Open aantron opened this issue 3 years ago • 5 comments

@clecat, thanks for the patch and for uploading your branches of http/af, etc. I imported your prefixed branches into my forks and pointed Dream to them, then applied your patch, doing a lot of work on it to merge it with current Dream master, and also getting some missed parts (dream-websocket).

There is still a bit of work left. I had created an independent dream-httpaf library, which contains the vendored http/af stack. Its name now conflicts with the prefixed dream-httpaf. I'm thinking to rename the prefixed httpaf to dream_httpaf_. This probably requires a change back in the vendored fork of httpaf, so that the main module is Dream_httpaf_. @clecat, could you resume your workflow (since I would have to work it out), and rename Dream_httpaf to Dream_httpaf_ until make succeeds? I'll then get back to this PR and finish off the merge. You can pull the code in this PR from branch prefix-vendored.

Fixes #198.

cc @dinosaure

aantron avatar Feb 07 '22 17:02 aantron

Thank you, I will work on it as soon as possible

clecat avatar Feb 08 '22 09:02 clecat

Dear @aantron and @clecat, I tried to used dream in mirage together with a git implementation, and stumble upon this issue. I tried for some hours to get the module name collisions sorted without any success (now some code in mirage attempts to use Dream__pure.Inmost which does not seem to exist anymore).

Is there a path forward? E.g. could the vendored libs (in src/vendor) just not expose any public_name? I'd be keen if this works smoothly in the end.

hannesm avatar May 24 '22 15:05 hannesm

@hannesm I have a fork that unvendors the libraries to make it compatible with Piaf, it requires some pins I think, I've only used it with nix and esy so far.

ulrikstrid avatar May 24 '22 17:05 ulrikstrid

@ulrikstrid interesting -- could you point me to the branch / commits? :)

hannesm avatar May 24 '22 18:05 hannesm

Here is my branch: https://github.com/ulrikstrid/dream/tree/piaf-compat

Here is the patch in the nix overlays: https://github.com/anmonteiro/nix-overlays/blob/master/ocaml/dream/upload.patch Used here and here

And here is where it's used in a esy project: https://github.com/marigold-dev/deku/blob/main/esy.json#L86-L111

Hopefully it helps @hannesm, this uses @anmonteiro's packages of httpaf etc

ulrikstrid avatar May 25 '22 06:05 ulrikstrid