OvermindDL1 / bucklescript-tea

TEA for Bucklescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running tea with Melange

idkjs opened this issue · comments

Hi @OvermindDL1

I tried building something with this and running the program gets you the error main is not a function

Here is a reproduction -> feluxe/bs-tea-starter-kit#3

The error occurs on the example and on Usage.re which is copied from these docs.

Thanks for any guidance.

I'm not really sure I can recommend using this project for new code since bucklescript's changes over the past year have broken a lot of various things, it seems to be going more toward a non-ocaml setup rather than something that transparently handles all setups. I'll accept a PR if you find a fix for this (or if you want to take up overall work then I can give full access), but I'm not sure it's worth trying to "upgrade" to a newer bs-platform version. If you use bs-platform things you might want to stick with the older versions that implement to OCaml more correctly. Otherwise JSOO has some fantastic tea-like API's as well.

@OvermindDL1 I hear it. I might see how far the upgrade goes version by version of bucklescript and try to figure it out. Mostly because there is a lot of value in this project as an example of what is possible. Hate to see it get mothballed. Thanks for the feedback. I will revert if I get anywhere.

@jayesh-bhoot has it working here https://github.com/jayesh-bhoot/spiced-tea. FYI.

@idkjs If it's working there then that's still using a main function, what changed in the BS api?

Please feel free to PR any fixes though!

I agree with @OvermindDL1 .

All I did in https://github.com/jayesh-bhoot/spiced-tea was to make bucklescript-tea work with melange, and document that. The API works as-is.

I don’t see why anything should change in this repo, may be except documenting the integration with melange.

I can confirm that everything works as-is with melange. I've also created a sample repo that integrates with dream and adds tailwindcss: https://github.com/tcoopman/dream-melange-tea-tailwind

I'm really curious if someone could figure out what's the different in OP's example then, I wonder if there might be a compat issue then....