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.
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.ml
s.