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

Immutable Model Classes #2225

Open
georgetayqy opened this issue Jun 9, 2024 · 0 comments
Open

Immutable Model Classes #2225

georgetayqy opened this issue Jun 9, 2024 · 0 comments

Comments

@georgetayqy
Copy link
Contributor

What feature(s) would you like to see in RepoSense

The current implementation of the model classes does not always guarantee immutability. As such, there is a risk that modifying an instance of a model class may result in unintended side effects on other instances of the same or different model classes.

As such, we should look into refactoring the model classes such that operations that accepts objects or returns objects will return new instances of said object containing identical information as the original copy of the object.

Is the feature request related to a problem?

Related to #2119 and #2124.

If possible, describe the solution

We could start with the smaller model classes first, and attempt to turn them immutable first, before moving on to the more complex model classes.

If applicable, describe alternatives you've considered

N/A

Additional context

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant