Skip to content
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

Get rid of SplitRunner class and restrcuture CLI handlers and APIs #48

Closed
erbesharat opened this issue Dec 9, 2024 · 1 comment
Closed
Labels
codesplit enhancement New feature or request help wanted Extra attention is needed

Comments

@erbesharat
Copy link
Member

Detailed Description

The SplitRunner class currently complicates the architecture of the codebase, causing duplicated logic between CLI handlers and various API endpoints. We want to eliminate the SplitRunner class entirely and restructure both the CLI and API handlers to follow the same interface-based approach used by our LanguagePlugin system. By moving to a more unified interface, we can streamline the code, reduce duplication, and ensure that all split and scan functionalities are implemented in a single, consistent manner. This will result in a cleaner, more maintainable codebase that is easier to extend and debug.

Context

The current architecture is prone to fragmentation and repeated logic, making it challenging to track down bugs and maintain a consistent behavior across different parts of the system. By removing the SplitRunner class and aligning the CLI handlers and API implementations with an interface-driven approach, we can provide a cohesive and predictable structure. This will benefit both developers and operators, allowing for clearer reasoning about the code, fewer points of failure, and an easier onboarding process for new contributors.

Possible Implementation

  1. Remove the SplitRunner class and refactor all of its functionality into a common interface or module similar to how we handle LanguagePlugin implementations.
  2. Update CLI handlers and API endpoints to use these new interfaces, ensuring that split and scan logic is defined once and used everywhere.
  3. Provide a consistent interface layer that the CLI tools and the APIs can both leverage, reducing code duplication and consolidating error handling and logging routines.
  4. Add comprehensive tests to verify that both CLI and API functionalities remain intact and that the new interface structure works as intended.
@erbesharat erbesharat added enhancement New feature or request help wanted Extra attention is needed codesplit labels Dec 9, 2024
@erbesharat
Copy link
Member Author

This is not relevant anymore after the changes done by @florianbgt on #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codesplit enhancement New feature or request help wanted Extra attention is needed
Projects
Status: Done
Development

No branches or pull requests

1 participant