fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming
https://fabulous.dev
Apache License 2.0
1.15k stars 121 forks source link

Xamarin Hot Code Reloading #1021

Closed KarateCowboy closed 1 year ago

KarateCowboy commented 1 year ago

Hello,

Thank you for making this wonderful framework. I have searched high and low, but I cannot find anything about if it is possible to use enable hot code reloading with Fabulous. There are some stack overflow posts about the C# Xamarin and hot reloading. They say things like you must have all the Xamarin libraries at version five. I do not know if that version is compatible with Fabulous. I would start poking around with my packages.config file but my gut tells me that would be a Rabbit Hole of Pain.

Any advice and/or warnings?

TimLariviere commented 1 year ago

Hi @KarateCowboy

As far as I know .NET Hot Reload and XAML Hot Reload are for C# / XAML only, so it's not compatible with F# or Fabulous. We had an equivalent in Fabulous v1 called Fabulous.LiveUpdate, but we had to abandon it for v2.

Unfortunately, this kind of tool requires a lot of compiler knowledge (basically hot reloading is an interpreter instead of compiler) and we are very few to contribute to Fabulous with very little time.

albertwoo commented 1 year ago

I was also looking forward to hot reload. But it may depends on fsharp core team: https://github.com/dotnet/fsharp/issues/11636

KarateCowboy commented 1 year ago

Thank you @TimLariviere for informing me of the situation. I sometimes joke that 'F' is for fun and 'sharp' is to cut through the competition, but 'F' could also mean "Few". At least now I know it's not just me doing something wrong with my build process!

@albertwoo It's good to know I'm not alone.