ml-in-barcelona / jsoo-react

js_of_ocaml bindings for ReactJS. Based on ReasonReact.
https://ml-in-barcelona.github.io/jsoo-react
MIT License
138 stars 19 forks source link

replace {dev} with :with-test #80

Closed jchavarri closed 2 years ago

jchavarri commented 2 years ago

When this package is added as a dependency of another project, because it has not been published to opam, the behavior of dev variable is to become true and so dev dependencies will get installed as well. In jsoo-react case, this means reason gets installed, which means trouble with recent OCaml versions like 4.13.1.

From opam docs:

dev: true if this is a development package, i.e. it was not built from a release archive

From @aantron in Discord:

yeah it seems that its best to use it for things that are actually necessary for the build of an unreleased package specifically, which is few things in ocaml these days (nothing for most projects), and is probably bad form

Ideally, there'd be a with-dev flag, but it doesn't seem to exist. So for now, i'm (ab)using with-test for this.

jchavarri commented 2 years ago

Merging.

ftr there will be a with-dev in future versions of opam 🎉 https://github.com/ocaml/opam/issues/4959#issuecomment-996614645