phetsims / ph-scale

"pH Scale" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/ph-scale
GNU General Public License v3.0
0 stars 7 forks source link

Missing dependencies for DerivedProperties #290

Closed pixelzoom closed 9 months ago

pixelzoom commented 10 months ago

Related to https://github.com/phetsims/axon/issues/441 ...

In https://github.com/phetsims/ph-scale/commit/b72330eccde4a804a7a5f24af6789fb11439208d and https://github.com/phetsims/ph-scale/commit/edbccb588170a88ebf8995082820f08d70704047, @samreid added accessNonDependencies: true to temporarily silence missing dependencies for DerivedProperties. These should be addressed.

pixelzoom commented 10 months ago

All of these uses of accessNonDependencies are cases where the DerivedProperty depends on itself. We're still negotiating whether that's a necessary dependency, see https://github.com/phetsims/axon/issues/441#issuecomment-1810592906. So on hold until that's decided.

pixelzoom commented 9 months ago

In https://github.com/phetsims/axon/issues/441#issuecomment-1861331455, @samreid and I said:

We decided that this complicates DerivedProperty unnecessarily. And self-reference should be something that is rarely done, possibly even to be avoided. In cases where it is necessary, the developer should opt out ...

So I'll continue to opt out using accessNonDependencies: true in this sim. And I'll close this issue.