Fix completion inconsistently filtering obsolete fields and events (#13512)#19506
Open
Fix completion inconsistently filtering obsolete fields and events (#13512)#19506
Conversation
Member
|
@copilot : Try again |
Copilot stopped work on behalf of
T-Gro due to an error
March 27, 2026 08:31
Member
|
@copilot : Try again. |
Copilot stopped work on behalf of
T-Gro due to an error
March 27, 2026 11:44
Member
|
@copilot Try again |
Contributor
Author
Reimplemented from scratch on latest main in commits Root cause: Fix: Added |
Copilot
AI
changed the title
[WIP] Copilot Request
Fix completion inconsistently filtering obsolete fields and events (#13512)
Mar 31, 2026
6f6cf86 to
d7f1fd8
Compare
Contributor
❗ Release notes required
|
d7f1fd8 to
96ad019
Compare
Add ILFieldInfoIsUnseen and EventInfoIsUnseen functions to filter obsolete IL fields and events from completion, matching existing behavior for methods and properties. Also update ItemIsUnseen to handle ILField and Event items. Fixes #13693 Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/1d21d452-3f55-4d56-898c-0b50980050b5 Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
Fix issue number to #13512. Add ObsoleteMembersClass to CSharp_Analysis with obsolete and non-obsolete members. Add 6 C# interop completion tests verifying all obsolete member types are consistently hidden. Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/1d21d452-3f55-4d56-898c-0b50980050b5 Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
96ad019 to
8521961
Compare
T-Gro
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix an inconsistency where FCS code completion shows some obsolete members (IL fields and events) but hides others (methods and properties). All obsolete members are now consistently hidden from completion by default, respecting the
SuggestObsoleteSymbolsoption.Root Cause
ResolveCompletionsInTypeinNameResolution.fsfiltered obsolete methods (viaMethInfoIsUnseen) and properties (viaPropInfoIsUnseen) but had no equivalent filtering for IL fields or events. This caused obsolete fields and events from C# assemblies to appear in completion while obsolete methods and properties were hidden.Changes Made
AttributeChecking.fs/.fsi: AddedILFieldInfoIsUnseenandEventInfoIsUnseenfunctions, following the same pattern as existingPropInfoIsUnseenandMethInfoIsUnseen. Both handle IL, F#, and type provider cases.NameResolution.fs: Applied the new filtering functions inResolveCompletionsInTypefor events and IL fields. Also updatedItemIsUnseento handleItem.ILFieldandItem.Eventfor defense-in-depth on other completion paths.CSharpClass.cs: AddedObsoleteMembersClasswith obsolete and non-obsolete static fields, methods, properties, and events for C# interop testing.Checker.fs: AddedgetCompletionInfoWithCompilerAndCompletionOptionshelper to support completion tests with external assembly references.CompletionTests.fs: Added 8 new tests:[<Obsolete; CLIEvent>])11.0.100.md.Testing
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.