mobx.dart icon indicating copy to clipboard operation
mobx.dart copied to clipboard

Allow users to bypass observability system for performance; Avoid unnecessary observable notifications of `@observable` fields of `Store`s; Fix Reaction lacks toString, so cannot see which reaction causes the error; Add StackTrace to reactions in debug mode to easily spot which reaction it is

Open fzyzcjy opened this issue 2 years ago • 7 comments

Close #857 Close #858 Close #859 Close #855 Close #864

Pull Request Checklist

  • [ ] If the changes are being made to code, ensure the version in pubspec.yaml is updated.
  • [ ] Increment the major/minor/patch/patch-count, depending on the complexity of change
  • [ ] Add the necessary unit tests to ensure the coverage does not drop
  • [ ] Update the Changelog to include all changes made in this PR
  • [ ] Run the set:versions command using npm or yarn. You can find this command in the package.json file in the root directory
  • [ ] Include the necessary reviewers for the PR
  • [ ] Update the docs if there are any API changes or additions to functionality

fzyzcjy avatar Jul 12 '22 13:07 fzyzcjy

Deploy Preview for mobx canceled.

Name Link
Latest commit 1803928507e994c7ac4c50575f62417afe0e8425
Latest deploy log https://app.netlify.com/sites/mobx/deploys/6319c5e7db1fa0000e17006a

netlify[bot] avatar Jul 12 '22 13:07 netlify[bot]

p.s. I may not merge this before PRs like https://github.com/mobxjs/mobx.dart/pull/842 is merged, since otherwise my master branch will be destoryed

fzyzcjy avatar Jul 12 '22 13:07 fzyzcjy

Codecov Report

Merging #844 (74ea2e5) into master (13b7e6d) will decrease coverage by 0.15%. The diff coverage is 86.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #844      +/-   ##
==========================================
- Coverage   98.96%   98.81%   -0.15%     
==========================================
  Files          55       55              
  Lines        1924     1945      +21     
==========================================
+ Hits         1904     1922      +18     
- Misses         20       23       +3     
Flag Coverage Δ
flutter_mobx 100.00% <ø> (ø)
mobx 98.33% <86.36%> (-0.20%) :arrow_down:
mobx_codegen 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mobx/lib/src/core/atom.dart 93.87% <0.00%> (-6.13%) :arrow_down:
...rc/api/observable_collections/observable_list.dart 100.00% <100.00%> (ø)
...src/api/observable_collections/observable_map.dart 100.00% <100.00%> (ø)
...src/api/observable_collections/observable_set.dart 100.00% <100.00%> (ø)
mobx/lib/src/core/action.dart 100.00% <100.00%> (ø)
mobx/lib/src/core/atom_extensions.dart 100.00% <100.00%> (ø)
mobx/lib/src/core/computed.dart 100.00% <100.00%> (ø)
mobx/lib/src/core/context.dart 97.18% <100.00%> (+0.01%) :arrow_up:
mobx/lib/src/core/observable.dart 100.00% <100.00%> (ø)
mobx/lib/src/core/reaction.dart 98.57% <100.00%> (+0.04%) :arrow_up:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 13b7e6d...74ea2e5. Read the comment docs.

codecov[bot] avatar Jul 12 '22 13:07 codecov[bot]

Add onDispose callback to Computed, such that old values can be properly disposed

feature implemented, test added, and passed

fzyzcjy avatar Sep 04 '22 08:09 fzyzcjy

@amondnet tests added

fzyzcjy avatar Sep 04 '22 08:09 fzyzcjy

test reproduced #855

image

fzyzcjy avatar Sep 05 '22 13:09 fzyzcjy

Revert "dispose"-related features according to #860

fzyzcjy avatar Sep 06 '22 00:09 fzyzcjy

Hi all,

If this is in a "LGTM" state, is it just awaiting for @pavanpodila to approve or can someone else help with the load?

Thanks.

ghenry avatar Dec 19 '22 11:12 ghenry

@fzyzcjy @ghenry This PR has solved many issues( https://github.com/mobxjs/mobx.dart/issues/857, https://github.com/mobxjs/mobx.dart/issues/858, https://github.com/mobxjs/mobx.dart/issues/859, https://github.com/mobxjs/mobx.dart/issues/855, https://github.com/mobxjs/mobx.dart/issues/864). If you bump the version and write a chagelog, I'll merge it.

amondnet avatar Dec 19 '22 16:12 amondnet

Hi, @fzyzcjy I add the missing tests, bump the version and write the changelog. https://github.com/mobxjs/mobx.dart/pull/894

amondnet avatar Jan 27 '23 17:01 amondnet