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

Fix/get members 2173 #2174

Merged
merged 5 commits into from
Apr 16, 2024

Conversation

evinosheaforward
Copy link
Contributor

@evinosheaforward evinosheaforward commented Apr 14, 2024

What does this PR do and why?

Fix reported issue with actions being reported as views in getMembers:
#2173

issue was bad if/else if causing actions to be returned as views.

The issues

Steps to validate locally

For brute force exploring the differences, I took the existing v5.1.0 reflection tests and ran them vs both 5.1.0 and master and compared the views, properties, volatiles, and actions. This did yield a result of extra views on master (extra view for each action), so I started a git bisect looking for the commit where that changed and found 62e7e8bafe8bf07f4694e429f734bb12323fd8ef as the "bad commit".

Then I updated the tests to fail in this PR.
Finally, the fix commit passes the new reflection tests

@coolsoftwaretyler
Copy link
Collaborator

Thanks @evinosheaforward! I will take a look today or early in the week. I expect we'll merge soon and ship a patch to v5, and include in v6.

@evinosheaforward
Copy link
Contributor Author

evinosheaforward commented Apr 14, 2024

Thanks @evinosheaforward! I will take a look today or early in the week. I expect we'll merge soon and ship a patch to v5, and include in v6.

Cool - sounds great!

I'll note that there may be another bug reported in #2173
this PR fixes actions -> views but not views -> volatiles
I'll look into the latter and you can lmk if you want to ship the fixes separately or together

edit: made a comment on the issue pointing out that the behavior for the views -> volatiles in the reported issue seems correct. Hopefully you can double check me on that.

Copy link
Collaborator

@coolsoftwaretyler coolsoftwaretyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @evinosheaforward - thanks again for this great PR! It definitely fixes the "actions in view reflection" part of #2173.

I think the view/volatiles part might be a separate issue. I'm inclined to handle that in a new PR to keep these things focused. I'll try and put together a test case for that one and respond in the original issue.

With that said, I have a few small requests to finish up this PR. I marked them as blocking because I want to get those changes in before merge, but if you don't have the time to address them this week, let me know and I can handle them.

src/core/mst-operations.ts Outdated Show resolved Hide resolved
__tests__/core/reflection.test.ts Show resolved Hide resolved
@coolsoftwaretyler coolsoftwaretyler merged commit 7563cb5 into mobxjs:master Apr 16, 2024
1 check passed
coolsoftwaretyler pushed a commit that referenced this pull request Apr 17, 2024
* test: add failing test to confirm changed behavior issue-2173

* fix: correct getMembers actions/flowactions categorization issue-2173

* chore: update if/else formatting in getMembers for posterity issue-2173

* test: add explicit expect for flow action is added to actions in getMembers issue-2173

* test: add flow action testing to reflection - members chained test issue-2173

---------

Co-authored-by: Evin O'Shea <evinoshea@gmail.com>
coolsoftwaretyler pushed a commit that referenced this pull request Apr 17, 2024
* test: add failing test to confirm changed behavior issue-2173

* fix: correct getMembers actions/flowactions categorization issue-2173

* chore: update if/else formatting in getMembers for posterity issue-2173

* test: add explicit expect for flow action is added to actions in getMembers issue-2173

* test: add flow action testing to reflection - members chained test issue-2173

---------

Co-authored-by: Evin O'Shea <evinoshea@gmail.com>
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