-
Notifications
You must be signed in to change notification settings - Fork 302
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
Refactor remaining Project and Build files #85
base: main
Are you sure you want to change the base?
Conversation
Project File structuring
Where there's a condition by target properties, we should group them together under |
f7299f7
to
ddcd107
Compare
a5bd710
to
8002aaa
Compare
82a70b6
to
fbeb0c1
Compare
1ab0a31
to
2eb009b
Compare
9754305
to
51e244a
Compare
@Sergio0694 PR closed by 237 by mistake. Can you reopen it? |
Huh, weird, yeah no problem! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some nits 🙂
CommunityToolkit.Diagnostics/CommunityToolkit.Diagnostics.csproj
Outdated
Show resolved
Hide resolved
CommunityToolkit.HighPerformance/CommunityToolkit.HighPerformance.csproj
Outdated
Show resolved
Hide resolved
CommunityToolkit.HighPerformance/CommunityToolkit.HighPerformance.csproj
Outdated
Show resolved
Hide resolved
CommunityToolkit.Mvvm.SourceGenerators/Attributes/NotNullWhenAttribute.cs
Outdated
Show resolved
Hide resolved
tests/CommunityToolkit.Mvvm.ExternalAssembly/CommunityToolkit.Mvvm.ExternalAssembly.csproj
Outdated
Show resolved
Hide resolved
tests/CommunityToolkit.Mvvm.ExternalAssembly/CommunityToolkit.Mvvm.ExternalAssembly.csproj
Outdated
Show resolved
Hide resolved
456db4d
to
d648a69
Compare
CommunityToolkit.Diagnostics/CommunityToolkit.Diagnostics.csproj
Outdated
Show resolved
Hide resolved
...ertyChanging.UnitTests/CommunityToolkit.Mvvm.DisableINotifyPropertyChanging.UnitTests.csproj
Outdated
Show resolved
Hide resolved
9a46945
to
322bc61
Compare
322bc61
to
d91f622
Compare
d91f622
to
735d3d2
Compare
735d3d2
to
ab1efc3
Compare
@Sergio0694 Updated in response to PR #428 which broke this! |
Just a heads up, there's major changes I'm doing in #436, so this PR will need updates after that as well. |
404c5be
to
c532ba6
Compare
8ada70e
to
6210e79
Compare
Still going to suggest that we close this PR, as it should be broken out into smaller PRs as mentioned above. @Nirmal4G in general doing things like renaming a directory from Similarly, unless we can automate structuring of the project file XML with a tool like XAML Styler does for XAML files in the WCT repo, then manually moving Item/PropertyGroups around is just a temporary thing that also just creates more noise that's hard to review. Especially when mixed in with other changes in part of a larger PR. Diving into making changes can be fun and exciting, but if you want to ensure your contributions are having a meaningful impact and will be merged; it's best to start a conversation with an issue or discussion first to lay out exactly what you plan to do, how it benefits the project, and what's involved with the change. This should be scoped to something that's a single 'block' and not a laundry list of lots of items. Each idea should be its own issue. Or ask to pick up an already open bug or issue on the repo that someone's not working on or reach out on Discord to Sergio or myself and ask if there's something on the top-of-our-minds build related that we're struggling with that you could assist with. Really happy to have your passion directed at our projects, but we just want to ensure we're on the same page and can move forward together! Thanks! |
@michael-hawker This is still in draft! Also this is on top of existing PRs. Changes that are mutually exclusive are separated but when they are cumulative, how they can be separated? Code changes are one thing but refactorings are if not always cumulative and to produce clean diff and blame, they need to be arranged properly by theme of change or purpose of change. I'm still a novice but if may ask, how would you separate this patch without causing conflicts that break build!? |
@michael-hawker There's a discussion open for these PRs. It's part of a larger refactoring with the goal of introducing a common build infra for Community Toolkit repos (or atleast for my forks if we're not moving forward with the idea!). |
6210e79
to
a7a93ae
Compare
- Rename `build` folder to `eng`: - This is a standard build infra directory used in official dotnet projects. - Rename NuGet Icon to `Icon.png`: - This is no longer used as a public reference point for NuGet icon URL. - Also, Icon URL is deprecated. Hence, it's safe to change. - Normalize casing for `ReadMe.md`: - Repository information files such as ReadMe, License, etc... are only UPPER_CASE if they are without an extension. With extension, the casing becomes PascalCase or Kebab-Case. The primary reason is attention to the presentation of file names. - Do Kebab-Case when a phrase is presented. E.g., `Code-of-Conduct.md`. - Rename solution file to `CommunityToolkit.sln`: - The `dotnet` seems implied and also doesn't stand-out in the file list because of the lower casing and `d` char. - Spaces are a main issue when doing automation (_like using `*.sln` in build scripts and in URLs it adds `%20`_). - Move `toolkit.snk` file to `eng` sub-directory. - Remove un-needed and deleted files from solution. - Update Git Ignore entries to latest from upstream. - Indent text in `ThirdPartyNotices.txt` with spaces instead.
- Fix the text flow warping in the MSBuild Console logging. - Use checked version properties instead of hard-coded checks. - Update the structure of the projects list in the Solution file. - Refactor Roslyn multi-targeting to use multiple projects in the same project directory without using Shared projects. This refactoring is made in preparation for the solution to use the NuGet's CPVM (Central Package Versions Management) feature. This also slightly improves IDE load time and Build performance.
- Move the T4 MSBuild logic to a new file. - Move Public Key to a new file 'toolkit.spk'. - Move MSBuild logic to near-by `Directory.Build.{props|targets}` files.
Follow the following rules: - SOF (_Start Of File_) Imports, - Core properties, Package properties, build properties, - Build items, Resource items, Content items, Misc. items, - In-place Imports, Choose (_elements within follows outer sort order_) - `ProjectReference` items, `PackageReference` items, - Targets and Properties and Items close to said Targets, - EOF (_End Of File_) Imports. Where there's a condition by target properties, we should group them together under `Choose`. For multiple target values, we should sort them by the order in which they are defined. And the order in which they should be defined is either ascending or descending in terms of compatibility layering.
- Add necessary guard to check for pack. - Remove redundant properties and values. - Remove and adjust quotes in property functions. - Use wildcards to generalize and reduce items declared.
- Remove redundant comments. - Add missing comments on certain code blocks. - Format code in comments with proper quote style.
Some property groups have conditions that also self-explain their purpose. So, Add labels to bare property groups only to differentiate among themselves. Then, when contributors add any additional properties, they'll know where to put them.
a7a93ae
to
2ea9102
Compare
I am Chinese!!!I like it! |
Info
Extracted from CommunityToolkit/WindowsCommunityToolkit#4234 as the Common Code projects were separated in this new repository.
Changes
Simplify Roslyn multi-targeting
in the same project directory without using Shared projects.
the NuGet's CPVM and TargetFramework as alias features.
Move MSBuild logic into new files
toolkit.spk
.Directory.Build.{props|targets}
files.Simplify MSBuild logic in project files
Add, Update and Format build Comments
Misc Changes
PR Checklist
feature
branch in your forkNotes
Please suggest alternate names for
dotnet Community Toolkit.sln
. We have already established that we can't use.NET
.I tried using
NET
,DotNET
,dotNET
andCore
as prefix. Except forCore
, others neither look good nor stand-out in the file list.Merge pull request #xxxx from repo/branch
, and commit message to either PR message or messages of individual commits. Theauto-merge
option does this by default.