Skip to content

Support Hot Reload for ASP.NET Core for F# #35824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
serefarikan opened this issue Aug 27, 2021 · 5 comments
Closed

Support Hot Reload for ASP.NET Core for F# #35824

serefarikan opened this issue Aug 27, 2021 · 5 comments

Comments

@serefarikan
Copy link

Is your feature request related to a problem? Please describe.

I'm using F# to develop REST APIS with asp.net core and I have to go through the build cycle to reflect changes to my server side logic, which costs time compared to what's available to other languages and frameworks.

Describe the solution you'd like

I'd like to have support for Hot Reload that is on its way to be introduced in Asp.NET Core 6.

Additional context

This feature is already supported for C# but F# support is described as :
F# is currently not supported in .NET 6 but we are planning to support in a future release based on customer feedback
https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload

This the customer feedback.

@javiercn
Copy link
Member

@serefarikan thanks for contacting us.

We are not aware of anything specific we need to do in ASP.NET Core to support hot reload with F#.

As far as I understand there are two levels for this:

  • Compiler/IDE support (which we don't control)
  • Framework support (which we control if you are using ASP.NET Core)
    • If you are using one of the F# specific frameworks for building Rest APIs, they might need to update stuff to get hot reload working.
    • WRT to ASP.NET Core hot reload, we should already have things in place independent of whether you are writing the app in C# or F#.

Given that we believe we are already doing everything we have to do at the framework level, I'm going to transfer this to the F# repo to let those folks chime in.

/cc: @pranavkm

@Pilchie feel free to loop in more folk if you have more context.

@javiercn
Copy link
Member

This issue was moved to dotnet/fsharp#12049

@serefarikan
Copy link
Author

serefarikan commented Aug 27, 2021

@javiercn Thanks for your response, but please note that the blog post I linked appear to suggest that this is something to be supported from the <some MS team's> side (I realised it is not simply asp.net core). I may have got it wrong of course. I think it would help if @LyalinDotCom could clarify which door I should be knocking on to deliver the feedback he's asking for :)

@javiercn
Copy link
Member

@serefarikan as I mentioned, its a dance between framework, compiler and IDE.

If you are using ASP.NET Core MVC with F#, the framework part is covered in the sense that MVC already does whatever it has to in order to make sure updates from the compiler are applied. If you are using something like Giraffe, I imagine those folks need to do something when the compiler has an update.

The compiler itself needs to support hot reload which I don't think it does (which is why I moved this to the F# repo so they can comment or further help you).

Finally, the IDE needs to inform the compiler I believe that there are file changes available to produce a new patch.

This is just to point out that I think we are already doing our part in ASP.NET Core and giving other folks in the dotnet team a chance to see this feedback and chime in on their respective areas, since I'm not an expert on those and can't comment on.

Finally, as I mentioned, if you are using a third-party framework, they might need to do work to further support hot reload experiences. I know for a fact we have to refresh caches and a bunch of other similar things when a hot reload patch gets applied.

@serefarikan
Copy link
Author

Very helpful @javiercn , thanks.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants