JetBrains / azure-tools-for-intellij

Azure Toolkit for JetBrains Rider.
MIT License
50 stars 10 forks source link

Allow comments in the `local.settings.json` file #900

Closed rafaelldi closed 1 month ago

rafaelldi commented 2 months ago

Here https://github.com/JetBrains/azure-tools-for-intellij/blob/develop/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/localsettings/FunctionLocalSettingsService.kt#L30 we should add allowComments https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-builder/allow-comments.html

RubenDelange commented 2 months ago

Hi @rafaelldi, do you have any ETA on this one?

rafaelldi commented 2 months ago

Unfortunately not, because here we are dependent on IntelliJ Platform. When the kotlinx-serialization-json package will be updated in the Platform, we will be able to use this property. This might happen in 2024.3, but I can't guarantee it.

wislon commented 1 month ago

@rafaelldi me again haha, I've noticed this as well, suddenly, since upgrading to the Azure Toolkit for Rider v4.2.1 (where you helpfully fixed the 'can't find certificate' error).

It didn't used to do this before though, I've been launching functions with comments in the local.settings.json for at least the last 18 months, even before. would a downgrade of Rider to something earlier than 2024.2.4 help with this? Or is there perhaps a workaround?

Edit to update: downgrading back as far as 2024.2.3 didn't resolve the issue, also tried downgrading the Azure Toolkit for Rider plugin but then started running into the 'invalid certificate' error again, at which point I gave up.

I've created an issue for Rider as well, maybe that might help get it some traction: https://youtrack.jetbrains.com/issue/RIDER-118306/Unable-to-Launch-Azure-Functions-Locally-With-Comments-in-local.settings.json

rafaelldi commented 1 month ago

I'll investigate a little and maybe find a solution.

wislon commented 1 month ago

This works perfectly now (after upgrading to Azure Toolkit for Rider plugin 4.2.2). Thanks so much for fixing this @rafaelldi ! 👏🏻