Skip to content

Conversation

@mrlacey
Copy link
Contributor

@mrlacey mrlacey commented Jun 14, 2022

Fixes #144

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some general questions based on what here's so far. Were you able to resolve the issue with UWP you had earlier?

@michael-hawker
Copy link
Member

Think there's merge conflicts from the file scoped namespaces, so you'll want to rebase.

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to strip out the locale from the docs urls. 🙂

@mrlacey mrlacey changed the title use GlobalUsings files 🚧 use GlobalUsings files Jun 14, 2022
@mrlacey mrlacey marked this pull request as ready for review June 15, 2022 21:36
@mrlacey mrlacey changed the title 🚧 use GlobalUsings files use GlobalUsings files Jun 15, 2022
@mrlacey
Copy link
Contributor Author

mrlacey commented Jun 15, 2022

Some general questions based on what here's so far. Were you able to resolve the issue with UWP you had earlier?

Yes, different groupings seems to have sorted it so that everything builds. I think the background compilation issue was what I was seeing previously.

@mrlacey
Copy link
Contributor Author

mrlacey commented Jun 15, 2022

The SourceGenerators and platform heads still have some using declarations as removing them all would require even more GlobalUsings_*.cs files for what seems like little (if any) benefit.
The number of projects (of different types) and the different dependencies each has meant it's not possible to put all declarations in a file (or files) that are referenced by all projects.

@mrlacey mrlacey mentioned this pull request Jun 15, 2022
Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking so much cleaner! I'm thinking later this is going to help with a lot of merging/refactoring of the streams later too as we can just chop the usings out of those files.

Have a few suggestions for clean-up, but think we're close! @Arlodotexe want to take a look too?

@mrlacey
Copy link
Contributor Author

mrlacey commented Jun 17, 2022

Hopefully that's everything now

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🎉🎉🎉

Thanks @mrlacey for the back-and-forth on this, really looking lean and clean now!

@michael-hawker michael-hawker merged commit 37611e3 into main Jun 20, 2022
@mrlacey mrlacey deleted the GlobalUsings branch June 20, 2022 21:57
Martin1994 pushed a commit to Martin1994/Labs-Windows that referenced this pull request Sep 2, 2023
* WIP

* put all test related namespaces in a single file

* Add GloblaUsings for System.* namespaces - used everywhere

* Start to move other Windows/Microsoft namespaces to a single file

* Don't include Rider temp/cache files

* Add link to docs explaining global using directives

* xPlatform projects need linked GU_Labs file as don't have a shared props file to reuse

* Update common/GlobalUsings_Tests.cs

Co-authored-by: Michael Hawker MSFT (XAML Llama) <[email protected]>

* Update common/GlobalUsings_Labs.cs

Co-authored-by: Michael Hawker MSFT (XAML Llama) <[email protected]>

* Update common/GlobalUsings.cs

Co-authored-by: Michael Hawker MSFT (XAML Llama) <[email protected]>

* Update GlobalUsings_Labs.cs

* simplify and standardize including GU_Labs

* Remove explicit `using Windows.Foundation;` to try and address CI build failures

* fix duplication of global usings

* Tidy up the CanvasLayout usings

commiting to test wider on the CI

* remove using declarations from SizerBase

* remove using declarations from template

* Add all GlobalUsings to the Solution so easily accessible

* Add license header to GlobalUsings files

* Expand comments explaining the GlobalUsings files

* Don't use a shared "Microsoft.UI.Xaml.Controls" declaration

* Remove duplication from GU_Tests

* Standardize filename pluralization

* centralize declarations for Automation namespaces

* rename GU_Labs > GU_WinUI

* Remove GU_Experiments as unneeded

Co-authored-by: Michael Hawker MSFT (XAML Llama) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GlobalUsings.cs to remove complexity of using different namespaces for WinUI2/3

2 participants