sora-editor icon indicating copy to clipboard operation
sora-editor copied to clipboard

[Refactor]: Rename `AnalyzeManager` to `AnalysisManager`

Open RivanParmar opened this issue 1 year ago • 2 comments

The name AnalyzeManager is quite confusing. Renaming it to AnalysisManager would make its purpose clearer, especially since the package name also has analysis in it. Other related files will also have to be renamed.

RivanParmar avatar Jan 08 '24 18:01 RivanParmar

Renaming a class is probably not a good idea, especially when it is part of a library AND is a public API. This is because libraries are meant to be used in other projects, and if such a refactoring is done, it would unnecessarily introduce a breaking change and will require the implementations in dependant applications to be changed as well.

If that kind of refactoring is really needed, deprecating the current API and introducing a new API should be considered so other implementations have enough time to migrate to the new API. However, this might lead to significant changes in the library's codebase depending on how widely the current API is used internally in the library.

itsaky avatar Jan 08 '24 20:01 itsaky

@itsaky You're right. Deprecating the current API would be a logical solution. Also, there are only about 16 to 17 usages in the library's codebase, which I think would be easy to replace right now rather than when the codebase expands.

I'm proposing this change since this library would be used in many projects and having a clear name would allow the developers to easily understand what the interface does as well as align with the naming conventions.

RivanParmar avatar Jan 09 '24 07:01 RivanParmar