microsoft / vscode-azurefunctions

Azure Functions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions
MIT License
289 stars 131 forks source link

Show quickpicks if there are multiple runtime matches for `targetFramework` #4165

Open motm32 opened 1 month ago

motm32 commented 1 month ago

Related to https://github.com/microsoft/vscode-azurestaticwebapps/issues/899

Currently the runtime is chosen using .find so the first match will be chosen. We should allow users to choose which runtime they want.

nturinski commented 1 month ago

I'm a little perplexed why it would have that behavior. Shouldn't it being an exact match on the .NET framework? So looking for .NET 8.0, and .NET 6.0 shouldn't match?

Edit: Oh, I think I understand what you mean. Since the targetFramework can be an array as well, it's matching the very first element of the array.

I think we should probably either a.) prompt the user if there are multiple matches or b.) add a property to the elements that indicates which is default

There are some concerns such as what Alex brought up that I have with the current logic.

motm32 commented 1 month ago

I think we should probably either a.) prompt the user if there are multiple matches or b.) add a property to the elements that indicates which is default

I think originally the SWA team wanted to prompt so I could see "a" being the best option. And I do think the list is always returned the same way but either way makes more sense to me to prompt than to automatically choose.

alexweininger commented 1 week ago

Make sure these tests are passing in the Actions before merging. Also is the plan that this should not change any existing Functions UX right? We might want to inform CTI of this change and have them watch out for it.

motm32 commented 1 week ago

Make sure these tests are passing in the Actions before merging. Also is the plan that this should not change any existing Functions UX right? We might want to inform CTI of this change and have them watch out for it.

I am investigating right now since one of the tests I added is failing. And you are correct this should only change when a targetFramework exists which at the moment should only be in SWA. I will inform CTI of the change.