fsbolero / Bolero

Bolero brings Blazor to F# developers with an easy to use Model-View-Update architecture, HTML combinators, hot reloaded templates, type-safe endpoints, advanced routing and remoting capabilities, and more.
https://fsbolero.io
Apache License 2.0
1.06k stars 54 forks source link

Hot Reload with Elmish #187

Open nabeelvalley opened 4 years ago

nabeelvalley commented 4 years ago

Good day, is it possible to configure hot-reloads when using F#/Elmish instead of HTML?

If not are there plans to include this at some point - or is it not really possible?

Tarmil commented 4 years ago

There was @tylerhartwig's FCSWatch-based hot reload tool, but it hasn't been updated in quite a while: https://github.com/tylerhartwig/Elmish.HotReload.Bolero. It would definitely be worth looking into updating it to make it work with the latest Bolero and Blazor.

tylerhartwig commented 4 years ago

Yes, the effort was never fully completed, but it is possible to configure some amount of hot reload for the view/update/init parts of Elmish

farlee2121 commented 3 years ago

Do we know if the hot reload changes for Blazor will work with Bolero?

It looks like it only handles C# files, but my understanding of how the hot reload works is pretty basic.

I've also yet to get Bolero working on .NET 6 to directly try running with the new hot reload profile.

Side note: For any who coming looking for any kind of runtime reload, dotnet watch run will recompile while running, but requires a page refresh for changes to show.

Tarmil commented 3 years ago

Do we know if the hot reload changes for Blazor will work with Bolero?

It seems to be based on Edit & Continue, which only supports C# and VB unfortunately.

farlee2121 commented 3 years ago

It looks like they plan to support hot reload for F# along with .NET 6.

The post isn't specific about if this applies to the VS debugger and/or dotnet watch, and I wasn't able to track down the github issues where it might have been discussed. Still, fingers crossed

Tarmil commented 3 years ago

Not along with .NET 6, but "in a future release", so I don't expect it soon; but the more we talk about it, the more resources they'll dedicate to it and the quicker it will come.

farlee2121 commented 3 years ago

Ah. I took that to mean a future release of .NET 6 previews. Your probably right though.