-
Notifications
You must be signed in to change notification settings - Fork 789
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
Implement interface code fix #2112
Conversation
Fantastic :) |
BTW, the preview is particular useful for this feature :) |
Regarding performance, will there be a way to disable the features that the user deem not useful like in VFPT? I'm concerned that having all the features in VS but no way to disable those might lead to bigger performance concerns, I know some F# users don't install VFPT because of this. |
@smoothdeveloper that were not the features that makes VS slower with VFPT enabled. It was FCS itself. Now we have FCS in VS built-in and its older duplicate has gone. Enabling / disabling features like the one implemented in this PR does not affect performance. |
@vasily-kirichenko thanks, figured that separate FCS was hurting a lot as well, looking forward to try that new version soon :) |
In general you'll have slow performance on very large files (a few thousand lines), which is something we're definitely going to address after VS RTM release. Can't afford the time to do it now, but it's a priority. I've noticed that if files stay under 1k lines, it's pretty fast and definitely usable. |
@smoothdeveloper having that said, we are definitely planning to add a setting dialog, like we had in VFPT, see #2111 (comment) |
This looks great @dungpa :) Only thing to note is that the "Implement Interface Explicitly" should be in normal sentence case for consistency with the other code fixes (i.e. "Implement interface explicitly"). Also maybe the verbose option should be more clear - I can't tell without looking at the preview what it does. I also think that that "Stub missing interface methods" reads better. |
@saul Thanks. I renamed the labels to "Implement interface explicitly" (meaning having type annotations on arguments and return types) and "Implement interface explicitly without type annotation". @vasily-kirichenko That part has never been done in VFPT. I will have a look at implementing it. |
Perhaps FSharp.Core should contain
However we could only use that in codegen if the appropriate version of FSharp.Core was referenced |
@dsyme I don't think so ... the purpose of the nyi is a reminder to the developer to add code here. |
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.
LGTM
* Create InterfaceStubGenerator service * Add a prototype of ImplementInterface code fix * Fix indentation calculation * Support both interface declarations and object expressions * Handle already implemented members * Localize lightbulb text * Rename labels
Move the feature from VFPT: