Skip to content

Completion is available for some obsolete members only #13512

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

Open
auduchinok opened this issue Jul 14, 2022 · 1 comment
Open

Completion is available for some obsolete members only #13512

auduchinok opened this issue Jul 14, 2022 · 1 comment
Labels
Area-LangService-AutoComplete autocomplete/intellisense Bug good first issue help wanted Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@auduchinok
Copy link
Member

public class Class
{
    [Obsolete("Field is obsolete")] public static readonly int ObsoleteField = 1;

    [Obsolete("Method is obsolete")]
    public static void ObsoleteMethod()
    {
    }

    [Obsolete("Property is obsolete")] public static int ObsoleteProperty => 1;
    [Obsolete("Event is obsolete")] public static event EventHandler ObsoleteEvent;
}

FCS code completion provides items for the field and the event, but not for the method and the property:

Screenshot 2022-07-14 at 14 08 05

I think the code completion should be more consistent here: hide all or show all, but not something in between.

A bit off-topic: it would be nice to allow enabling completion for obsolete items via an FSharpChecker setting or a completion API parameter.

@auduchinok auduchinok added the Bug label Jul 14, 2022
@vzarytovskii vzarytovskii moved this to Not Planned in F# Compiler and Tooling Sep 9, 2022
@vzarytovskii vzarytovskii added this to the Backlog milestone Sep 9, 2022
@vzarytovskii vzarytovskii added the Area-LangService-AutoComplete autocomplete/intellisense label Sep 9, 2022
@dsyme
Copy link
Contributor

dsyme commented Sep 23, 2022

Completion should hide all here by default.

A bit off-topic: it would be nice to allow enabling completion for obsolete items via an FSharpChecker setting or a completion API parameter.

@auduchinok I guess we would accept a PR for this, perhaps a command line flag is simplest

@dsyme dsyme added good first issue Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. labels Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-AutoComplete autocomplete/intellisense Bug good first issue help wanted Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
Status: New
Development

No branches or pull requests

3 participants