bbenne10 / reason-todo

Small experiment in ReasonML
4 stars 1 forks source link

Cool Project #7

Closed idkjs closed 3 years ago

idkjs commented 3 years ago

Thanks for sharing this.

Question. How did you get the frontend to read the yojson types that you pull in with Types.re?

I can't get it to build. Maybe its just that so much has changed in the ecosystem. Still I figured just running this would work.

Either way, thanks for sharing.

bbenne10 commented 3 years ago

Honestly, I haven't tried to build this since about the time of the last commit. I had assumed that it would still build given the pinning of the dependencies.

What issue are you having specifically? I might be able to help (or fix the code) if I could see a build traceback.

If you're just asking about problems that happen BEFORE a build, I think that merlin might have some issues before first attempted build as there's nothing for merlin to inspect until a build is attempted.

There's a lot of things that I didn't understand at the time of writing (dune specificallty) that I understand much more deeply this time around. If it'd help, I might find some time to redo this in a more informed (and opinionated) fashion.

idkjs commented 3 years ago

@bbenne10 hey boss. So I just reran it, respecting the pins, and it runs as expected. I am trying to do this same sort of thing but I was using melange to compile and there is some sort of conflict having to projects compiling with esy when one is using melange and esy. You are not using melange so I need to go figure that out. Thanks for the guidance, sir. Back to studying your code.

bbenne10 commented 3 years ago

Melange would be my go-to these days were I to do this again. If you find out the way to get this code base working with that toolset or of you work up a new example, please let me know.

These days I'm doing a fair amount of server side only Reason, so i haven't needed to (nor wanted to, tbh) keep up with the Reason/ReScript/Melange drama

idkjs commented 3 years ago

Man, i hear that. I am in deep limbo here because my knowledge base is reason/web and rescript is not reason/ocaml.

Im trying to build your project with melange to figure out how to have an opium server and melange built project in the same repo. They dont work well together.

bbenne10 commented 3 years ago

Honestly, the first step id take in this is switching away from ReWeb. It is a good product, but requiring pins to get it working (and not being able to use vanilla dune) just makes onboarding more difficult. Opium or dream would be good replacement candidates. Then you could drop esy entirely and build the project using dune alone.

This might not be possible with melange, but should be very doable with BuckleScript pre-rescript.

idkjs commented 3 years ago

Agree totally. The point though is to understand how it can be done. Proof of concept. And if its not doable, need to know that, document it.

Totally doable with bs-platform/rescript. You already did it! So if that is what we have to do, that is not idea. You are stuck with 4.06.1 so hopefully not the case.

bbenne10 commented 3 years ago

One thing I hadn't considered is that the frontend code never actually sees the yojson stuff. It uses decco.

idkjs commented 3 years ago

turns out that an update to bs-platform@9.0.2 will cause the ninja to see the yojson code and throw so theres that if the point was just to update the project deps, which it isnt, but good to know.