Check accessibility before offering "Implement interface" codefix#60297
Check accessibility before offering "Implement interface" codefix#60297CyrusNajmabadi merged 14 commits intodotnet:mainfrom DoctorKrolic:check-accessibility-in-implement-interface
Conversation
src/Features/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.cs
Outdated
Show resolved
Hide resolved
|
I'm wary about this change as i think it may be fine for the user to still have the choice of implementing this. Perhaps they want this to be implicit and can change the accessibility later. We have one report of this and no votes since this feature was ever implemented. So i'm really not sure this warrants any actual change. |
src/Features/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.cs
Outdated
Show resolved
Hide resolved
|
ok. so "implement interface" is not "implement implicitly". "implement interface" just means "implement this sensibly". So, as per kevin's suggestion, we should just be making those particular members be explicit impls. And, we should check and see if we're going to make all the members explicit. If so, then we should not offer the main option, and just offer the second one. |
…y check to a separate helper class, added a bunch of tests
|
@CyrusNajmabadi Any other egde cases?) |
|
Flying. We'll check tomorrow :-) |
src/EditorFeatures/CSharpTest/ImplementInterface/ImplementInterfaceTests.cs
Outdated
Show resolved
Hide resolved
...es/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.AccessibilityHelper.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.cs
Show resolved
Hide resolved
...es/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.AccessibilityHelper.cs
Outdated
Show resolved
Hide resolved
...es/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.AccessibilityHelper.cs
Outdated
Show resolved
Hide resolved
...es/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.AccessibilityHelper.cs
Outdated
Show resolved
Hide resolved
...es/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.AccessibilityHelper.cs
Show resolved
Hide resolved
...es/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.AccessibilityHelper.cs
Outdated
Show resolved
Hide resolved
...es/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.AccessibilityHelper.cs
Outdated
Show resolved
Hide resolved
@DoctorKrolic we're fixing our test-queues right now. Once htey're running successfully again I'll restart this PR :) |
|
@CyrusNajmabadi Have you fixed your issues with the test-queues?) |
|
Yup. Can you please merge latest main info your branch. |
|
@DoctorKrolic You don't have to keep merging main in. I'll track this PR and get it in :) |
|
This is my common strategy to get All checked passed green tick without need to ask you and other owners to restart CI 100500 times. I once tried to use azp command and found out, that I don't have permission to use it even on my PR). In the end it helps me to avoid situations like this, when PR is approved and even auto-merge is enabled, but CI failed and PR got stuck |
The problem doing this is that you restart all tests instead of the ones that may be flakey. this means you have to run the flakey gamut each time. |
|
Note: your PR keeps actually failing here. I think you may actually have introduced a product bug here. |
|
I'm seeing the CI machine spit out: |
…github.com/DoctorKrolic/roslyn into check-accessibility-in-implement-interface
Head branch was pushed to by a user without write access
Sounds scary. Fixed) |
...es/Core/Portable/ImplementInterface/AbstractImplementInterfaceService.AccessibilityHelper.cs
Outdated
Show resolved
Hide resolved
…github.com/DoctorKrolic/roslyn into check-accessibility-in-implement-interface
Fixes: #4146
7 years later...