You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I.e., hot module reloading for transitive imports. We already watch transitively imported modules, but the problem is that we can’t simply refresh cells that import a module after that module changes: once you import something at a given URL, it is permanently in memory.
To fix this, we need to rewrite top-level imports and transitive imports so they include a content hash or modification time of the imported module and its transitive dependencies. When an imported module changes and we are notified via the watcher, we need to recompile the code for the affected cells and send the new definition to the client as an update↓. The newly compiled code will include the new hash/mtime as part of the imported path, such that when the client runs it, it will import the changed modules.
Related #115#79#78#77 which also require rewriting imported modules. (And #136 which was the first step.)
The text was updated successfully, but these errors were encountered:
Also, when an imported module changes, recompiling the top-level code block (or expression) also means that the set of transitively imported modules can change, and therefore we’ll end up watching a different set of files. In other words refreshAttachment must do quite a bit more work than sending a refresh↓ event to the client.
I.e., hot module reloading for transitive imports. We already watch transitively imported modules, but the problem is that we can’t simply refresh cells that import a module after that module changes: once you import something at a given URL, it is permanently in memory.
To fix this, we need to rewrite top-level imports and transitive imports so they include a content hash or modification time of the imported module and its transitive dependencies. When an imported module changes and we are notified via the watcher, we need to recompile the code for the affected cells and send the new definition to the client as an update↓. The newly compiled code will include the new hash/mtime as part of the imported path, such that when the client runs it, it will import the changed modules.
Related #115 #79 #78 #77 which also require rewriting imported modules. (And #136 which was the first step.)
The text was updated successfully, but these errors were encountered: