bsansouci / bsb-native

Build system for OCaml/Reason
Other
245 stars 10 forks source link

Don't handle ppx [@bs] when compiling to not JS #40

Closed bsansouci closed 6 years ago

bsansouci commented 6 years ago

Right now if you use [@bs] is code, it'll cause an error when compiling to native/bytecode. I think the reason is because we're using bsc as a parser, because it already handles parsing + generating deps. I think it also happens to handle ppx-es automatically.

We want to move away from that and use a custom executable for native/byecode. I did that work on the esy-support branch for anyone interested in solving this. Should be pretty straightforward, you can basically copy https://github.com/bsansouci/bsb-native/blob/02b09d01fbe7cff67661f80d2222946a66b631eb/jscomp/bsb/bsb_native_parse.ml and use it on the right bsb_rule.mls.

bsansouci commented 6 years ago

cc @jchavarri :)

bsansouci commented 6 years ago

Fixed at head.