Skip to content
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

Generator doesn't warn when FunctionName is specified on a method that has multiple overloads #583

Open
AtOMiCNebula opened this issue Aug 19, 2022 · 2 comments
Assignees
Labels

Comments

@AtOMiCNebula
Copy link

We had code written like the following, which didn't yield any build errors, but did fail in the host with "ambiguous match found" errors:

public class ExampleFunctions
{
    public ExampleFunctions(ILogger log)
    {
        // ...
    }

    [FunctionName("FunctionOne")]
    public async Task Run([HttpTrigger(AuthorizationLevel.Anonymous, "get")] HttpRequest req)
    {
        // ...
    }

    [FunctionName("FunctionTwo")]
    public async Task Run([ServiceBusTrigger("functiontwo", Connection = "ServiceBusPrimaryConnectionString")] string myQueueItem)
    {
        // ...
    }
}

We resolved it by renaming the two Runs into two different distinct names. It would be nice if the generator could warn about this at build time, though!

@ramya894 ramya894 self-assigned this Oct 19, 2022
@ramya894
Copy link

@AtOMiCNebula We will check this issue with our next level team and update you.

@AtOMiCNebula
Copy link
Author

@ramya894 any updates here? It's been nearly a year. ☹️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants