chocolatey / chocolatey/choco

Rename project namespaces to PascalCase

Open
#3,122 0 comments 0 reactions 0 assignees View on GitHub
0 - Backlog Breaking Change Enhancement
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [X] I have verified this is the correct repository for opening this issue.
- [X] I have verified no other issues exist related to my request.

### Is Your Feature Request Related To A Problem? Please describe.

Chocolatey is pretty unusual in that its namespaces are all lowercase. Just about everything in .NET seems to use PascalCase for its namespaces.

### Describe The Solution. Why is it needed?

This is a follow on from #3096 in order to get our projects' naming standards more up to date. This is filed as a separate issue because before we're able to do this, we need to essentially [Obsolete] every single type in the codebase, and then on a breaking change release we can rename the namespaces.

### Additional Context

When we do this, we have to be _very_ careful. There are numerous instances in CLI and also the licensed extension where we use Reflection to get at methods or properties or embedded resources, and we need to be very cautious that these are updated correctly to match. The bulk of these will be constants or readonly properties in ApplicationParameters, but we should also do a blanket search for `GetMethod` / `GetProperty` / other Reflection usages (maybe just audit any files containing `System.Reflection`, to catch everything).

This would also be a good time to rename any project files / DLLs that we would like to rename, as doing that also has similar foot-gun implications and it would be simplest to deal with all of these at once, rather than multiple times, I think.

### Related Issues

- #3096

Contributor guide

Open the contributing guide

Research direction

Start by reviewing related issue #3096 and the namespace and project naming conventions described here. Audit ApplicationParameters and files using System.Reflection, including GetMethod and GetProperty, across the CLI and licensed extension. Done means the namespace, project, and DLL renames are consistently reflected in those usages without breaking the referenced resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, cli, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.