Closed
Description
Bucklescript is great! However Still not reached a level of maturity the seems to be production ready for the masses. There are not so subtle warts with the developer experience. These are some that I have seen mentioned on discord and between colleagues of mine since we started using bucklescript at our company internally.
-
bsb -make-world
- this command fills my terminal with information that isn't particularly useful to me. Bucklescript should hide this information and just tell me when its done building. -
Error Messages
- the error messages kinda suck. Following improvements are huge:- Format the error message code/type definitions when printing them to the console and add code and type highlighting.
- Show where the error occurs in my code, underline what is causing this error.
- Provide suggestions on how to fix the errors
- Syntax errors are particularly bad and type errors could be waaaay better
- Bucklescripts competition is elm. If you want to appeal to developers to pick bucklescript the developer experience must be on par or better. Bucklescripts developer experience is bad in this regard. Inspiration can be taken from elm error messages, reasonml bettererrors error format, create-react-app redbox
-
Production Mode Setting
- currently theres no production mode in bucklescript that handles everything for us.- We have to defer to a js bundler/buildsystem and manage 2 build system (bucklescript and either webpack, rollup, gcc). This is less than ideal and given the js fatigue everyone in js land has, no one that is sane will be willing to jump ship just to manage 2 build systems. Although at the moment I think elm uses webpack for development features, but doesn't rely on it in production.
- For bucklescript to be become as easy to use and as appealing as humanly possible it should take on some of the responsibility that is usually left to js bundler/buildsystem space. if it did it would be immediately more appealing than elm or purescript. Especially if it could intelligently automatically run our code through GCC and use GCC code splitting features and advanced mode creating the most optimized sized bundles possible it would be a show stopper.
- Also someone mentioned on discord for bucklescript to run our code through prepack and gcc to provide code that starts up fast in the js vm and is optimized to be as few bytes as possible . This seems outlandish and unlikely but if bucklescript were to pull off would be magical and second to none.
-
Useful and Developer experience additions
- When building our code bucklescript should show the following information after every compilation:
- Build: Success | Failure (with appropriate red or green highlighting)
- Time to build: Float
- Overall Build Size: Float (in kb)
- Inspiration
- When building our code bucklescript should show the following information after every compilation: