dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.03k stars 1.73k forks source link

Weird types appear in Intellisense #13549

Open jonathanpeppers opened 1 year ago

jonathanpeppers commented 1 year ago

Description

image

I suspect these are created by a source generator and we need to make them hidden?

Steps to Reproduce

  1. new maui app
  2. Type _ and look at the Intellisense results

Link to public reproduction project repository

Just use the template

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

Doesn't matter

Did you find any workaround?

No

Relevant log output

No response

drasticactions commented 1 year ago

Could this be a cause of performance issues? If you have tons of generated XAML types (Like, say, the MAUI Source Repo has with its samples) that might not be good for Roslyn performance if it has to go over them.

jonathanpeppers commented 1 year ago

@drasticactions I think this source generator needs to emit EditorBrowsableState.Never on the above types:

https://github.com/dotnet/maui/blob/main/src/Controls/src/SourceGen/CodeBehindGenerator.cs

They come from Styles.xaml and Colors.xaml.

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

homeyf commented 1 year ago

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Can repro on MAUI Project with sample project. image