-
Notifications
You must be signed in to change notification settings - Fork 577
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
Update lsp generation for more accurate documentation #742
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
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. |
*/ | ||
function writeDocumentation(doc) { | ||
function writeDocumentation(doc, proposed, since, sinceTags, deprecated) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really just accept a single parameter of a shape that includes all of these props, looking at each of the calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I swapped this to an inline object type. I looked in metaModelSchema.mts
to see if there was a base type that each of these objects extended but didn't find one. Let me know if you have a better idea here.
Merging #789 and rerunning CI here shows that the formatting is in fact being changed in an unexpected way. |
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 thelsp_generated.go