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

Circularity caused by ResetAllButton.isResettingAllProperty #894

Open
jonathanolson opened this issue Dec 18, 2024 · 1 comment
Open

Circularity caused by ResetAllButton.isResettingAllProperty #894

jonathanolson opened this issue Dec 18, 2024 · 1 comment

Comments

@jonathanolson
Copy link
Contributor

Finally identified the Vite failure I've been tracking for a while. Results in it trying to load ResetAllButton before it has loaded ResetButton, resulting in a failure for npx vite serve (the default/fast/best way of running things that scenerystack wants to support).

After building scenerystack, npx madge --ts-config ./tsconfig.json --warning --circular ./src detects circularities. The two offending circular dependency chains are:

  • tambo/js/sharedSoundPlayers.ts
  • tambo/js/sound-generators/SoundClipPlayer.ts
  • tambo/js/sound-generators/SoundClip.ts
  • tambo/js/sound-generators/SoundGenerator.ts
  • scenery-phet/js/buttons/ResetAllButton.ts
    • (A) directly to sharedSoundPlayers
    • (B) ResetButton => RoundPushButton => sharedSoundPlayers

The most logical path forward (that I see at the moment) is to extract ResetAllButton.isResettingAllProperty into its own file, so that it doesn't force loading of the button chain (and breaks the circular dependency).

@jonathanolson jonathanolson self-assigned this Dec 18, 2024
jonathanolson added a commit to phetsims/projectile-data-lab that referenced this issue Dec 18, 2024
jonathanolson added a commit to phetsims/mean-share-and-balance that referenced this issue Dec 18, 2024
jonathanolson added a commit to phetsims/faradays-electromagnetic-lab that referenced this issue Dec 18, 2024
jonathanolson added a commit to phetsims/gravity-force-lab that referenced this issue Dec 18, 2024
jonathanolson added a commit to phetsims/center-and-variability that referenced this issue Dec 18, 2024
jonathanolson added a commit to phetsims/soccer-common that referenced this issue Dec 18, 2024
jonathanolson added a commit to phetsims/number-pairs that referenced this issue Dec 18, 2024
jonathanolson added a commit to phetsims/tambo that referenced this issue Dec 18, 2024
jonathanolson added a commit that referenced this issue Dec 18, 2024
jonathanolson added a commit to scenerystack/scenerystack that referenced this issue Dec 18, 2024
@jonathanolson
Copy link
Contributor Author

@jbphet can you briefly check this to see if it's acceptable and looks correct?

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

2 participants