yawaramin / re-web

Experimental web framework for ReasonML & OCaml
https://yawaramin.github.io/re-web/re-web/index.html
MIT License
261 stars 8 forks source link

Can't install using opam #34

Closed bbenne10 closed 3 years ago

bbenne10 commented 3 years ago

Contrary to advice not to use in production systems, I'm adding a dependency on re-web to a semi-production system! I'm having trouble though because I can't use esy to manage my project, which means I don't have access to the published package. I've attempted to use opam directly by adding a pin:

pin-depends: [["re-web" "https://github.com/yawaramin/re-web.git#0.6.0"]]

Opam obviously can't parse the empty file in the root and therefore fails to create the pin. I'd be happy to create a PR to populate re-web.opam from the current contents of package.json, but I'm not sure if there's a good way to keep those files in sync.

Is there any other way I can rectify this without requiring changes in this repo? Or would a PR be accepted? Thanks for your help!

yawaramin commented 3 years ago

Hi! The thing is that re-web is using some dependencies which are available on npm only (basically Antonio Monteiro's forked versions of the httpaf stack, packaged up and published). So even if you were to use it with opam, the deps don't exist on opam at the correct versions. You'd have to pin them at the specific git commits and would be immediately stuck on those versions, and have to manually update the pins if you ever wanted to update your re-web version.

To keep things simple, I don't intend to support re-web with opam.

bbenne10 commented 3 years ago

Fair enough. Time to learn Opium or Co-http, I suppose. Thanks!