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

Make event args readonly #18

Open
transitive-bullshit opened this issue Dec 3, 2023 · 3 comments
Open

Make event args readonly #18

transitive-bullshit opened this issue Dec 3, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@transitive-bullshit
Copy link
Collaborator

This continues the work in #17 to make Dexter's core more immutable and easier to reason about.

Specifically, any of the objects passed to event handlers should be readonly to guarantee that event handlers don't have unintended side effects for future event handlers or internal functionality.

We may want to consider making other key objects like AbstractModel.params deep readonly as well.

@transitive-bullshit
Copy link
Collaborator Author

Bumping this now that #17 is merged. IIRC this was the cause of a nasty bug in Dexa awhile back.

@rileytomasek
Copy link
Contributor

shouldn't this be fixed by replacing all of the methods that mutate state with extend?

@transitive-bullshit
Copy link
Collaborator Author

Possibly; it's been awhile since I've looked at this code. Feel free to close if this is handled already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants