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

Investigate re-entrant Properties #32

Closed
samreid opened this issue Sep 4, 2018 · 3 comments
Closed

Investigate re-entrant Properties #32

samreid opened this issue Sep 4, 2018 · 3 comments

Comments

@samreid
Copy link
Member

samreid commented Sep 4, 2018

In phetsims/axon#179 we identified Property instances that are re-entrant. In this context, re-entrant means a change in value of the Property causes (via listeners) another change in the value of the same Property instance.

Re-entry can occur for at least 3 different reasons, which are document here: phetsims/axon#179 (comment)

value=0.9999999999999998, oldValue=1 // epsilon problem
value=-0.4277580409572783, oldValue=-0.5 // large delta problem
value=[Object], oldValue=[Object] // object changed to object problem.  May be same object?

This issue is to search through the Properties with reentrant: true and:

(a) confirm that the Property really requires reentrant: true
(b) identify the reason for the reentry (may be one of the 3 classes above)
(c-i) see if the code can be rewritten so it no longer requires a reentrant Property, or document why the code uses a re-entrant Property
or
(c-ii) document why the code uses a re-entrant Property

It is unclear what the priority should be for this issue. It should probably be investigated before first RC, if not sooner.

@ariel-phet should this simulation have a responsible dev listed in https://github.com/phetsims/phet-info/blob/master/sim-info/responsible_dev.md ? It is currently blank.

@ariel-phet
Copy link

@arnabp this would be good for you to work on.

Feel free to ping other developers for help if this is not clear.

@ariel-phet ariel-phet assigned arnabp and unassigned ariel-phet Sep 4, 2018
arnabp added a commit that referenced this issue Sep 5, 2018
@arnabp
Copy link
Contributor

arnabp commented Sep 5, 2018

Assigning to @jbphet review

@arnabp arnabp assigned jbphet and unassigned arnabp Sep 5, 2018
@jbphet
Copy link
Contributor

jbphet commented Sep 11, 2018

Functionally, the changes look good (and @arnabp and I discussed the issue prior to the changes). There are a few minor things that should be updated in order to meet PhET's coding style standards (see https://github.com/phetsims/phet-info/blob/master/checklists/code_review_checklist.md), and @arnabp and I will discuss in our regular weekly meeting.

@jbphet jbphet assigned arnabp and unassigned jbphet Sep 11, 2018
arnabp added a commit that referenced this issue Sep 11, 2018
@arnabp arnabp closed this as completed Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants