How does HMR handle updating all references?
In python if module A does a import moduleB then you reload module B, inside module A it will still be referring to the old version of module B. I was curious how you solved this, and I see __recursive_reload checking every attr of the given module recursively to find other modules that need reloading, but I don't see it updating those references. Does every module that imports module B need to explicitly call hmr.reload(moduleB) for this to work?
Hi, thanks for asking. It's a recursive function that returns itself, so yes, it will reload all the modules that need to be reloaded.
You only need to call the hmr.reload for the highest level import.
Feel free to ask if you have further questions! I'm happy to answer.