Creating connection profile through command palette will format and remove all comments from user setttings in settings.json
heresmike opened this issue · 4 comments
heresmike commented
- MSSQL Extension Version: 1.1.0
- VSCode Version: 1.14.1
- OS Version: Windows 7 Enterprise SP1
Steps to Reproduce:
- In Visual Studio Code, type
CTRL + ,
to open the settings.json file - On the right pane within the curly braces on a new line (e.g., the user settings), type
//This is a test
- Type
CTRL + S
to save the settings.json file - Follow the steps "Connect to SQL Server" as described in tutorial to create a new valid connection
- In Visual Studio Code, type
CTRL + ,
to open the settings.json file - Observe that the comment line has been removed
kevcunnane commented
@madlovin do you know if this just started occurring in 1.1? I think this is likely due to the fact we read in all the JSON and use a serializer to print it out again. That's where we're losing comments. We have some work tagged for the next release to start using the VSCode APIs for reading/writing settings again, which should help with this overall. We can take a look at this when doing that.
heresmike commented
@kevcunnane I just installed the extension yesterday, so I have no prior experience to share.
kevcunnane commented
Thanks for confirming. I believe this is a long-standing issue in that case. We'll look at it for our next update, hopefully we can fit it in.