thomashoneyman / purescript-halogen-realworld

Exemplary real world application built with PureScript + Halogen
https://thomashoneyman.com/guides/real-world-halogen
MIT License
792 stars 86 forks source link

Upgrade to Halogen 6 #80

Closed simonolander closed 3 years ago

simonolander commented 3 years ago

Hi!

It would be much appreciated if this project was bumped to Halogen 6. It seems like all the necessary dependencies are at 0.14.0 since a little while back. I gave it a shot, but I know too little about the library to translate the bus event source things.

thomashoneyman commented 3 years ago

I have a quick update: I'm going to release a small state management library for Halogen to replace the bus / event source implementation used in Real World Halogen. Once it's out I can start on the proper migration of this repository to Halogen 6. Hold tight -- it won't be too long!

and-pete commented 3 years ago

I have a quick update: I'm going to release a small state management library for Halogen to replace the bus / event source implementation used in Real World Halogen.

I recently bumped a project of my own to Halogen V6 and as it was based around this RWH project I figured I'd do that too in tandem.

Other than the busEventSource replacement, here is what seems to be needed to make the compiler happy:

The above was enough to build, but the following was just a new compiler suggestion in the modules with Formless forms:

If anyone waiting on V6 would like to see those changes above compared to the main branch here, I've pushed a branch of RWH that builds at the moment over here. There should be 1 commit that corresponds to each of the points above if you'd like to see (or use!) the differences.

That branch uses a temporary fix for busEventSource that I'm currently using in my own project that uses halogen-subscriptions (based on something kritzcreek linked on Slack). But I'll change to the new state management library that Thomas mentions above once it's available.

Happy to send a PR upstream to here for part or all of the points listed above above too, if you'd like. 🙃 I'm sure there are things that you'd want in a proper release that I've missed also. I didn't touch the CI file, for example. And the only documentation I edited was the example given for how to use busEventSource.

thomashoneyman commented 3 years ago

Thanks, @and-pete! I'll ping here when I've made an update for the busEventSource replacement, and then I'd be happy to use your work as the basis for a v6 update. I will also want to update some documentation and make a few other improvements and bugfixes to the project -- but that can come later! It will be fantastic to be on Halogen 6 regardless.

thomashoneyman commented 3 years ago

The busEventSource replacement is available here: https://github.com/thomashoneyman/purescript-halogen-store

I've got to add docs and publish it, but the code seems to be working well and hopefully it's a smooth replacement over here!

thomashoneyman commented 3 years ago

Closed in #82 -- thanks, @and-pete!