rrdelaney / reason-scripts

:beginner: Create a ReasonML and React development environment
MIT License
628 stars 58 forks source link

yarn build succeeds even with broken App.re #57

Closed zhzhang closed 6 years ago

zhzhang commented 6 years ago

After following the setup instructions with yarn https://github.com/reasonml-community/reason-scripts I delete a few random lines from App.re, including unbalancing brackets and jsx tags. I then run yarn build, which succeeds. When I run yarn start, the page appears blank. I feel like a compile-time error should be thrown here.

rrdelaney commented 6 years ago

This should be fixed in the upcoming 1.0 release ๐Ÿ˜Š can you try using reason-scripts@1.0.0-beta1 as the scripts version?

AdamBrodzinski commented 6 years ago

This seems to be broken with beta3. I've uploaded a repro with a missing semicolon that fails to compile and is swallowed (white screen in the browser, CLI compiled).

https://github.com/AdamBrodzinski/reason-scripts-repro-57/commit/37e640304a5dac1f7c8e5b3f8b3c38b530ac47bf

rrdelaney commented 6 years ago

@AdamBrodzinski did you get expected behavior with beta1?

AdamBrodzinski commented 6 years ago

@rrdelaney I skipped from 0.9 to beta3 but I can also check beta1 to confirm.

AdamBrodzinski commented 6 years ago

@rrdelaney confirmed, the repro also breaks on beta1.

rrdelaney commented 6 years ago

Thanks for checking... just for clarity, what version of Reason CLI are you using?

AdamBrodzinski commented 6 years ago

Sure no problem, glad to help out in any way I can. reason-cli@3.2.0-darwin. Also i'm running MacOS 10.12.4

ruaanvds commented 6 years ago

+1 - Getting same behavior. Any workarounds?

rrdelaney commented 6 years ago

@ruaanvds you can run โ€œyarn bsb -make-world -wโ€ in a separate window for now

rrdelaney commented 6 years ago

@zhzhang @AdamBrodzinski @ruaanvds Can you try creating a new reason-scripts app and try again?

AdamBrodzinski commented 6 years ago

@rrdelaney Yep, it works great now! It prints out the error to the console as expected as well as displays it into the HTML page ๐Ÿ‘ many thanks @anmonteiro !

anmonteiro commented 6 years ago

I'm working on a way to make this more resilient to other failures / changes in the future too.