phetsims / hookes-law

"Hooke's Law" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 4 forks source link

Missing dependency for DerivedProperty #84

Closed pixelzoom closed 9 months ago

pixelzoom commented 10 months ago

Discovered in https://github.com/phetsims/axon/issues/441 ...

In Spring, missing dependency on this.leftProperty:

    this.rightProperty = new DerivedProperty( [ this.equilibriumXProperty, this.displacementProperty ],
      ( equilibriumX, displacement ) => {
        const left = this.leftProperty.value;
        const right = equilibriumX + displacement;
        assert && assert( right - left > 0, `right must be > left, right=${right}, left=${left}` );
        return right;
      } );
pixelzoom commented 9 months ago

In https://github.com/phetsims/hookes-law/commit/2d3c89dd1d19ccd5a3df7641d3ce260477dd6bbd, @samreid added accessNonDependencies: true to temporarily silence this problem.

pixelzoom commented 9 months ago

Fixed in the above commit, closing.