Update lsp generation for more accurate documentation
I was poking around the lsp server and found that you guys generate a good bit of the types using the meta model. I noticed that when I re-ran the generation, I got different results than the currently committed file, and some of the documentation had weird indenting/spacing.
My efforts here were to normalize it and make it map more closely to the metaModel.json. I then ran the generation script so that it updated the lsp_generated.go
@microsoft-github-policy-service agree
I noticed that when I re-ran the generation, I got different results than the currently committed file
This shouldn't be possible; the script is deterministic. Did you run the scripts in the dir to grab the pinned copy? Are you missing a format step maybe? Note how CI fails.
I'm not sure I like the code added for this, honestly. It's a lot of code to duplicate for all of the places we write things.
This shouldn't be possible; the script is deterministic. Did you run the scripts in the dir to grab the pinned copy? Are you missing a format step maybe? Note how CI fails.
I did run the fetchModel script in the directory to grab the pinned copy using node.
The primary fix for this PR was to resolve the issue where the since documentation would be formatted correctly. I ran the initial script with no changes and got a problem where additional comment lines were added in places they shouldn't be (see image). This is why there was a slightly larger refactor.
Let me know if there is a specific way I should be running the fetchModel or generate script. I could be missing something here.
Merging #789 and rerunning CI here shows that the formatting is in fact being changed in an unexpected way.