azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

F# support in Azure functions

Open grab-a-byte opened this issue 3 years ago • 11 comments

In the core tools, using func shows the help page. In this, under the 'new' section it states the following

 new     Create a new function from a template. Aliases: new, create
    --language [-l]  Template programming language, such as C#, F#, JavaScript, etc.
    --template [-t]  Template name
    --name [-n]      Function name
    --authlevel [-a] Authorization level is applicable to templates that use Http trigger, Allowed values: [function, a
                     nonymous, admin]. Authorization level is not enforced when running functions from core tools
    --csx            use old style csx dotnet `functions`

Here it states F# can be used however in creating a new function app, F# is not an option to begin with and also specifying F# as a language ends up generating a C# file (tried both --langauge, -l , F# and FSharp).

The documentation for the core tools also completely omits F# even though it is listed in the core tools help pages. Please add the templates/support for F# or correct the core tooling help pages so as not to mislead and confuse.

grab-a-byte avatar Apr 14 '21 17:04 grab-a-byte

@parkeradam are you creating your app using dotnet or dotnet-isolated?

apawast avatar Apr 15 '21 17:04 apawast

@apawast if you're asking about the FUNCTIONS_WORKER_RUNTUME in the local.settings.json file then the answer is dotnet. (only place I could find dotnet or dotnet-isolated)

grab-a-byte avatar Apr 15 '21 18:04 grab-a-byte

Anything further on this required from me?

grab-a-byte avatar Apr 19 '21 15:04 grab-a-byte

@apawast Just curious about the status of this if there is any updates? :)

grab-a-byte avatar Apr 29 '21 07:04 grab-a-byte

I'm also curious if this will be addressed.

bigjonroberts avatar Aug 29 '21 03:08 bigjonroberts

Useful example of F# on .NET5 in Azure functions: https://github.com/Choc13/az-function-fsharp-net5

baileydoestech avatar Aug 29 '21 06:08 baileydoestech

is it somehow related to https://github.com/Azure/azure-functions-core-tools/pull/2667 ?

ed-ilyin avatar Sep 08 '21 07:09 ed-ilyin

ed-ilyin seems like it might be, nice to see F# getting some love these days. I think what lukebailey mentions is lright but with it not being built in, seems like F# was just left to the side. Fingers crossed for a speedy implementation from the ticket mentiones.

grab-a-byte avatar Sep 10 '21 09:09 grab-a-byte

is it somehow related to #2667 ?

That PR only solves the dotnet-isolated scenario, not the dotnet in-proc one.

aaronpowell avatar Sep 15 '21 00:09 aaronpowell

@aaronpowell , any idea if there is any further work on this? Or @apawast?

grab-a-byte avatar Oct 16 '22 17:10 grab-a-byte

@aaronpowell , any idea if there is any further work on this? Or @apawast?

Looks like there's a bug in the template selection logic, I've raised #3171 for it.

aaronpowell avatar Oct 16 '22 22:10 aaronpowell