-
Notifications
You must be signed in to change notification settings - Fork 96
Add code actions for missing type signatures #81
Conversation
One problem that I am observing locally, is that if I apply one of these actions in Emacs in the context of a larger file, then the signatures are sometimes garbled. As I seem to have lost the ability to apply code actions in VSCode, I can't tell whether this is an Emacs problem, or a problem with the implementation. |
6ba07d8
to
1d37341
Compare
|
|
Managed to get code actions working in VS Code once more: it all looks good over there, so this seems to be a problem with Emacs rather than this implementation. |
1d37341
to
1b5533a
Compare
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.
Looks great, thank you!
The big question that remains is what to do about enabling The tests force the issue with Over in #77, @ndmitchell suggested
Should I try doing it this way, or are there alternative proposals? |
... or should we just merge it as is, and think deal with enabling the warnings in a separate PR? |
I think this is a great first step for people who enable this warning. My ideal end state for everyone who doesn't enable the warning would be to have these quick fixes available, but not see even an info level diagnostic for missing signatures. I'm not sure if you can attach a quick fix without a diagnostic. The other option would be that top-level signatures that are omitted show up as code lenses, so you see:
But the |
In which case I propose that we merge this as is, and leave further considerations for another PR. |
But as it stands, it doesn't fully address #77, so I've removed the automatic closing. |
See #88 for how we should be doing inferred signatures if the warning is off, using the proper things in VS Code. |
Fwiw, I think. I would appreciate merging this and caring about the case without the warning enabled later. |
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.
Thank you for the PR and sorry for the delay!
* Add code actions for missing top-level type signatures * Turn signature tester into operator
* Add code actions for missing top-level type signatures * Turn signature tester into operator
* Add code actions for missing top-level type signatures * Turn signature tester into operator
Will need more thorough testing, and maybe more discussion of the different approaches considered in #77.