Azure / azure-functions-core-tools

Command line tools for Azure Functions
MIT License
1.31k stars 433 forks source link

F# support in Azure functions #2549

Open grab-a-byte opened 3 years ago

grab-a-byte commented 3 years ago

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.

apawast commented 3 years ago

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

grab-a-byte commented 3 years ago

@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 commented 3 years ago

Anything further on this required from me?

grab-a-byte commented 3 years ago

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

bigjonroberts commented 3 years ago

I'm also curious if this will be addressed.

baileydoestech commented 3 years ago

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

ed-ilyin commented 3 years ago

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

grab-a-byte commented 3 years ago

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.

aaronpowell commented 3 years ago

is it somehow related to #2667 ?

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

grab-a-byte commented 1 year ago

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

aaronpowell commented 1 year ago

@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.