lessp / fetch

Fetch libraries/interface for Reason/OCaml
https://lessp.github.io/fetch
MIT License
50 stars 1 forks source link

Separate libraries (and their dependencies) #8

Closed lessp closed 4 years ago

lessp commented 5 years ago

As raised by @anmonteiro and @ulrikstrid, the should at least split its dependencies:

@anmonteiro

I might be a minority here, but a suggestion I'd make is to get rid of (most) dependencies personally I'm very careful in what (transitive) dependencies I depend on and I don't think I'd use a library that brings in reason as a dependency, or a "core" library like tablecloth

@ulrikstrid

The core fetch library should probably not have any dependencies and then there should be implementations that have dependencies

Et7f3 commented 5 years ago

One solution is to have multiple json manifest and have multiple opam file. One disadvantage is they can be out of sync. I will create a script for reason tool to automatically generate opam file based on json packges.

ulrikstrid commented 5 years ago

@Et7f3 if you could create a tool that takes esy json file and outputs stuff into the dune-project file you're basically there. That shouldn't be too hard.

Et7f3 commented 5 years ago

What content should be printed in dune-project ? are you referring to this ? https://dune.readthedocs.io/en/latest/opam.html#generating-opam-files

ulrikstrid commented 5 years ago

Yes, this is how I generate my opam files: https://github.com/reason-native-web/morph/blob/master/dune-project

ulrikstrid commented 5 years ago

This would also be useful for pesy if you create it

lessp commented 5 years ago

So, a structure similar to: https://github.com/facebookexperimental/reason-native, and then generate .opam-files from the json-manifests alternatively via dune-project?

lessp commented 5 years ago

Started in #9 which is now merged onto the master-branch. Still need to generate .opam-files!

lessp commented 4 years ago

Dependencies have been separated, if we want to generate opam-files, it's probably better to create a separate ticket for that. 🙂