-
Notifications
You must be signed in to change notification settings - Fork 1.1k
dotnet CLI: Rename project and command sub-folders #47800
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
Conversation
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.
Copilot reviewed 1314 out of 1318 changed files in this pull request and generated no comments.
Files not reviewed (4)
- TemplateEngine.slnf: Language not supported
- sdk.sln: Language not supported
- source-build.slnf: Language not supported
- src/BuiltInTools/dotnet-watch/dotnet-watch.csproj: Language not supported
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. --> | ||
<Project> | ||
<Project> |
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.
Oh, I should also mention that any of the .csproj files I opened, I made the whitespace consistent and some of these files, like this one, have the xml
header and this copyright comment, which is not necessary for non-source files. There are very rare situations that the xml
header is needed, but none of these .csproj files needed it.
The project name matching the assembly name is normal practice. |
While that is true, there is the Edit: I'm generally following most of the rules from these design guidelines. Using When it comes to standards/conventions/style, there are always places to bend/stray from those. It isn't a rigid requirement. But as mentioned, there are many other changes coming down the road, so this currently is just a pothole on that path I'm trying to fill it for now. |
If I'm searching for the project from which the |
That might not be produced by this project in particular, as I go through and do refactoring/feature additions. All this work is in-progress, but needs to be regularly committed as this space is worked on by multiple teams. But I need to do a lot of prep work like this before I can make bigger changes. However, I will keep that feedback in mind as I scaffold things out. The project I end up having that is the dotnet CLI executable might just be a thin client using some other libraries I create. |
I wrote the following before reading the other comments, but basically I agree with Kalle about the dotnet project rename.
I would prefer to avoid these renames. AFAIK the convention is for the assembly name, the namespace, and the project name to all be the same. The assembly name here is dotnet (for dotnet.dll). If the assembly name and the namespace don't match, I think it makes more sense to name the project after the assembly name. I think that makes it easier to understand and to find the right project or output DLL. |
I mentioned this in our standup but I'll put it here publicly. A majority of our CLI code is in this folder. However, I do not foresee this folder being the folder that creates the Here, this PR is intended to align things so that I could, eventually, make a PR that removes |
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.
Based on the team discussion, it seems like this PR can be merged if the assembly/folder name for dotnet.dll is retained, which you've applied above. I do appreciate the new folder names removing a lot of the redundant information.
Follow-up to: #47746
Summary
Originally, I was planning on doing these renames as separate PRs, but that will take forever to get merged. Instead, I've lumped together several renames into one. These are all high-level renames, and do not encompass individual file changes. That will be in another follow-up PR.
Changes
commands
folder toCommands
Cmds
) and then changed it toCommands
.Reference/dotnet-reference-add
becameReference/Add
Workload/clean
becameWorkload/CleanCmd
which then becameWorkload/Clean
.Renameddotnet.csproj
toMicrosoft.DotNet.Cli.csproj
Matches the namespace, which is normal practice.NOTE: Namespace alignment will be a completely different PR.Renameddotnet
folder toMicrosoft.DotNet.Cli
Normal practice for the folder to match the project name.Example
src\Cli\dotnet\commands\dotnet-reference\dotnet-reference-add
src\Cli\Microsoft.DotNet.Cli\Commands\Reference\Add
src\Cli\dotnet\Commands\Reference\Add
Keep in mind that
src\Cli
is a "product domain" folder. Meaning, each folder withinsrc
is a different "product" in a mono-repo sense. That's how we've come to organize this repo.Rationale
There will be other
Microsoft.DotNet.Cli.XXXXX
projects as I'm refactoring things, so I really need everything to be consistent here. We already haveMicrosoft.DotNet.Cli.Utils
and everything for the Cli will be prefixed withMicrosoft.DotNet.Cli
. Again, namespaces will be aligned soon. There are other planned renamings, but those are more focused on an individual level, or things like the.resx
files being all named the same thing, or all thetest
folder related stuff for the CLI. There's a lot of work to do here, so bear with me.