phetsims / gene-expression-essentials

An educational simulation about how genes work to create proteins.
GNU General Public License v3.0
4 stars 6 forks source link

Investigate re-entrant Properties #123

Open samreid opened 5 years ago

samreid commented 5 years ago

In https://github.com/phetsims/axon/issues/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: https://github.com/phetsims/axon/issues/179#issuecomment-414717687

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

Initially assigning to the responsible-dev for this repo, though it is unclear what the priority should be for this issue.

jbphet commented 5 years ago

We discussed the topic of what priority to give issues related to reentrant properties at the 9/6/2018 developer meeting and decided that these do not need to be addressed until the sim is re-released from master. I will unassign this issue, but it should be addressed if and when the sim republished from master.