Schmavery / reprocessing

ReasonML graphics library inspired by Processing
https://schmavery.github.io/reprocessing/
MIT License
679 stars 24 forks source link

bsb(-not-native) support #98

Open seethroughdev opened 5 years ago

seethroughdev commented 5 years ago

I'm sure this has been a discussed issue at some point. But it would be useful to publish this module to npm.

Currently installation works with the example repo, but not with reason-scripts or bsb.

I get the following errors when trying to build with a clean installation, no changed code, and only adding schmavery/reprocessing to npm, and Reprocessing to bsconfig.json:

./src/index.re
[14/14] Building src/ReactDOMRe.mlast.d
[7/7] Building src/ReactDOMRe.cmj
[4/4] Building src/jest.mlast.d
[2/2] Building src/jest.cmj
[2/2] Building fake_src/sdl_index.mlast.d
[1/1] Building fake_src/sdl_index.cmj
[2/2] Building src/tsdl_new.mlast.d
[1/1] Building src/tsdl_new.cmj
File "//node_modules/Tsdl/src/tsdl_new.re", line 175, characters 21-28:
Warning: Unimplemented primitive used:TSDL_GetError

[2/2] Building src/tgls_new.mlast.d
[1/1] Building src/tgls_new.cmj
[1/20] Building src/events.mlast
FAILED: src/events.mlast
/bs-platform/lib/bsc.exe    -w -30-40+6+7+27+32..39+44+45+101-44 
-nostdlib -I '/node_modules/bs-platform/lib/ocaml' -no-alias-deps -color always -c -o 
src/events.mlast -bs-syntax-only -bs-binary-ast /node_modules/Reasongl/src/events.ml
File "1/node_modules/Reasongl/src/events.ml", line 1, characters 18-22:
Error: Conditional expression type mismatch (bool,string)
[2/20] Building src/reasongl.mlast
FAILED: src/reasongl.mlast

File "/Reasongl/src/reasongl.ml", line 1, characters 18-22:
Error: Conditional expression type mismatch (bool,string)
[6/20] Building src/RGLInterface.mlast
ninja: error: rebuilding 'build.ninja': subcommand failed
Failure: //node_modules/bs-platform/lib/ninja.exe
    at Array.map (<anonymous>)ason-dash1/node_modules/Reasongl/lib/bs
    at <anonymous>
^C

If other people are also getting these errors, it might discourage new users from adding it to their existing projects.

Ebuall commented 5 years ago

Exactly the same issue. Tried bsb-native after that, but latest also didn't want to install.

Schmavery commented 5 years ago

sorry all, working on it. Publishing to npm is def something I want to do very soon @bsansouci

Schmavery commented 5 years ago

Oh sorry, I didn't realize you were trying to install this using bsb. We currently only support bsb-native as a build tool. Maybe if we get bsb to pass BSB_BACKEND variable it can work... mhh we'd also need the logic that choosing whether or not to build files depending on backend.

As far as npm goes, I was trying to get one or two things cleaned up first but I can probably just publish something in the meantime.

bsb-native#2.1.1 should work (that's what we have under CI), though I'm sure @bsansouci would be interested in hearing about your issues building bsb-native master.

seethroughdev commented 5 years ago

ah, well that solves it for my problem. i'll keep an ear out in case support gets added. thanks!

yunti commented 5 years ago

Hmm this had me stumped for a while until I found this. Rather than cloning I set up from scratch with the idea of learning more, but hit this issue.

bsansouci commented 5 years ago

Sorry for the trouble! We're working on fixing this actually. Hopefully we'll have good news soon.

yunti commented 5 years ago

No need to apologize, thanks for all your work on it. :) Look forward to hearing more when it's ready.

bukzor commented 5 years ago

Any news? I have the same story as @yunti.