Skip to content
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

"Go to all" and "Go to types" don't work for records #51672

Closed
vsfeedback opened this issue Mar 4, 2021 · 10 comments · Fixed by #52523
Closed

"Go to all" and "Go to types" don't work for records #51672

vsfeedback opened this issue Mar 4, 2021 · 10 comments · Fixed by #52523

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
If I declare a record type, and enter the type's name in "Go to all" or "Go to types", it isn't found.


Original Comments

Feedback Bot on 11/11/2020, 11:36 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Maryer Ma [MSFT] on 11/12/2020, 02:22 AM:

Thank you for your feedback! Based on your description so far, we were unable to reproduce it on 16.8.0. If we misunderstood your question, could you please correct us? In order to investigate your issue further, can you help to confirm several questions?

  1. Which project type and language you use?
  2. Are you installed other extensions in your machine? (Such as Resharper? Could you try to uninstall other extensions and then check whether your issue also reproduces or not?)
  3. Can you try to create a new simple solution(C# Console App or C++ Console App) and check if your problem also reproduces?
  4. Can you try to reset all VS settings(Navigate to Tools-> Import and Export Settings, then select ‘Reset all settings’) or repair your VS and then check whether your problem also reproduces or not?
  5. Can you please provide more info with your issue (Detail repro steps, simply project or repro video)?
    Please feel free to let us know if you have any doubt. We look forward to hearing from you!

Thomas LEVESQUE on 11/12/2020, 06:24 AM:

  1. .NET 5.0 , C#. Project type doesn’t seem to matter (I noticed it in an ASP.NET Core app, but also reproduced it in a console app)
  2. Just what came out of the box (fresh install).
  3. Yes, I reproduce it in a new solution.
  4. Like I said, it’s a fresh install. And I saw it on 2 different machines, so I don’t think it’s an installation issue.
  5. See attached solution (ConsoleApp1.zip). There is a PersonClass class and a PersonRecord record. If you open Go to all, and type t Person, only PersonClass appears, not PersonRecord

Maryer Ma [MSFT] on 11/17/2020, 00:23 AM:

@Thomas LEVESQUE
Thank you for replied. We tried the attached solution you provided, and found there is only one type ( PersonClass ) in the solution, so it only can search the one. It’s expected behavior. If we misunderstood your question, could you please correct us? Please feel free to let us know if you have any doubt. We look forward to hearing from you!
gotoall.png

gotoall.gif

Thomas LEVESQUE on 11/19/2020, 01:09 AM:

Maryer Ma [MSFT]

We tried the attached solution you provided, and found there is only one type ( PersonClass ) in the solution, so it only can search the one

PersonRecord is also a type. Record types are a new feature in C# 9.
The fact that it appears as a method in the solution explorer is also a bug (probably related)

Feedback Bot on 11/25/2020, 06:52 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Feedback Bot on 11/30/2020, 04:01 PM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.

microsoft on 1/14/2021, 08:57 AM:

PLEASE fix this. This is really annoying. I am using the CQRS architecture and I use command classes for every action. These are implemented with the new C# record features, but when I use CTRL-T and enter the command name (= record name), I can't find them anymore. This is very confusing!

Feedback Bot on 2/19/2021, 10:06 PM:

I detected that this issue hasn’t received a lot of activity, votes, or comments in the past 90 days. Based on this, the issues severity and affected area, it’s my experience that this issue is unlikely to get fixed. To improve the situation, consider following best practices for quality problem reports, and giving us more details on how this issue is impacting you.

Daniel Berghold on 3/3/2021, 08:57 AM:

Dear Microsoft, this bug is also causing a lot of confusion in our team! Team members are using CTRL-T to jump to DTOs or command objects but can’t find them and are confused therefore… Please consider fixing it.


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 4, 2021
@Youssef1313
Copy link
Member

Youssef1313 commented Mar 4, 2021

Hmm, I recall fixing something like this. I also couldn't reproduce in 16.9.

Edit: Go to all is working, but Go to types isn't.

Related PR: #48116

@CyrusNajmabadi
Copy link
Member

the t Name form doesn't seem to work for records.

@Youssef1313
Copy link
Member

Youssef1313 commented Mar 4, 2021

@CyrusNajmabadi

public const string Record = nameof(Record);

A check for this might be missing somewhere (probably in the internal implementation)

This also may have something to do with Microsoft.VisualStudio.Language.NavigateTo.Interfaces being missing "Records". See https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.language.navigateto.interfaces.navigatetoitemkind?view=visualstudiosdk-2019

@Youssef1313
Copy link
Member

Youssef1313 commented Mar 5, 2021

I dug a bit in this and I think it's indeed an internal implementation.

The Kinds of this filter Microsoft.VisualStudio.PlatformUI.NavigateToSession.NavigateToSearchOperation.FilterParameters doesn't contain record. I think I can workaround this in Roslyn, but better to fix the root issue:

image

@jinujoseph Would you be able to route this to the correct team?

@jinujoseph
Copy link
Contributor

cc @olegtk for info and attention

@olegtk
Copy link
Contributor

olegtk commented Mar 8, 2021

Route it to the Editor, @jinujoseph. Thanks!

@Youssef1313
Copy link
Member

@olegtk Any update on this? Note that record structs will be needed as well.

@CyrusNajmabadi
Copy link
Member

I'm not sure we need platform/editor to do anything here. We can just bucket record classes and structs under classes and structs for purposes of inter operating here.

@Youssef1313
Copy link
Member

@CyrusNajmabadi Alright, I'm going to look at this alternative.

@olegtk
Copy link
Contributor

olegtk commented Apr 9, 2021

I haven't seen it on the editor triage, did you route it? But somebody from the core Roslyn team can also just go ahead and send PR to internal VS-Platform repo adding Record to NavigateToItemKind enum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants