react-community / reason-react-native-scripts

BSD 3-Clause "New" or "Revised" License
78 stars 12 forks source link

`bsb -watch` being called from packager can cause some difficulties #7

Open desmond-dsouza opened 6 years ago

desmond-dsouza commented 6 years ago

It looks like calling bsb -watch and the native packager go together here: https://github.com/react-community/reason-react-native-scripts/blob/master/src/util/packager.js#L72-L75

ReasonML's editor support has shifted towards a language-server which itself runs bsb whenever needed, automatically regenerating the js files and piping errors back to the specific editor (I use VScode and it does work this way). The two bsb's can apparently conflict on such things as the single .merlin file.

Would you be open to separating the bsb -watch? I would suggest it not be included, and the README steps can tell the user that bsb-(re)compiling is needed e.g. through their editor setup or by them manually keeping a bsb -watch running in terminal (ReasonML and Bucklescript users probably know about bsb -make-world -clean-world -w already).

desmond-dsouza commented 6 years ago

I've tried the following:

The built-in language server does the right thing, which triggers the packager, which pushes the app update. So this should work.