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

API: Remove 'immer' dependency #196

Merged
merged 2 commits into from
Apr 10, 2019
Merged

API: Remove 'immer' dependency #196

merged 2 commits into from
Apr 10, 2019

Conversation

kevinbader
Copy link
Contributor

@kevinbader kevinbader commented Apr 5, 2019

'immer' didn't really work for us and led to all kinds of hard-to-debug
problems. Instead of relying on 'immer' to handle changes during event
sourcing, we now carefully deep-copy relevant data in the
*_eventsourcing.ts files and have the event-specific modules mutate
the aggregate in-place. This makes the latter very simple; at the same
time we ensure that the aggregates stored in the cache aren't changed
outside the cache.

Affected aggregates:

  • project
  • subproject
  • workflowitem

@kevinbader kevinbader added this to the TruBudget 1.0.0-beta.8 milestone Apr 5, 2019
@kevinbader kevinbader self-assigned this Apr 5, 2019
@kevinbader kevinbader removed their assignment Apr 9, 2019
@kevinbader kevinbader marked this pull request as ready for review April 9, 2019 13:47
@kevinbader kevinbader self-assigned this Apr 10, 2019
'immer' didn't really work for us and led to all kinds of hard-to-debug
problems. Instead of relying on 'immer' to handle changes during event
sourcing, we now carefully deep-copy relevant data in the
`*_eventsourcing.ts` files and have the event-specific modules `mutate`
the aggregate in-place. This makes the latter very simple; at the same
time we ensure that the aggregates stored in the cache aren't changed
outside the cache.

Affected aggregates:

- project
- subproject
- workflowitem
@kevinbader kevinbader merged commit 2981bb4 into master Apr 10, 2019
@kevinbader kevinbader deleted the nimmer-immer branch April 10, 2019 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants