Comments (2)
reloadModule
can keep the identity of objects when you tell it to keep its environment via passing options. However we specifically do not need to reload modules when we save them. Particularly for the purpose of commiting a module change we have the moduleSourceChange
method that should be used from within a tool via system. interactivelyChangeModule. This method uses a mechanism that ensures the identity of classes and exports and will properly update the instances of your classes.
from lively.modules.
Okay, this would probably solve the issue. However, the method interactivelyChangeModule
can only be used by the vmEditor
(or tools with a method updateModuleList
) due to this line:
await vmEditor.updateModuleList();
Instead, I would suggest to use notifications, so tools can subscribe to "moduleChange" and similar events. With the current implementation , other tools or multiple instances of the vmEditor
are not supported (with multiple vmEditors only one will update, leading to an inconsistent state).
from lively.modules.
Related Issues (20)
- persistent module state HOT 2
- imported modules are not updated in workspace modules HOT 2
- Dealing with new exports of module HOT 1
- Lazy definitions HOT 3
- Including lively modules bundle as test dependency HOT 1
- System notifier for module and package events HOT 1
- Superclass not correctly initialized in modules with circular dependencies HOT 6
- how can packages be used? HOT 2
- package.json is not checked for validity HOT 2
- manual import via doit doesn't work for non-packages
- new module creation + import issue HOT 1
- Remove methods from class prototype when changing class definition
- Improving compile performance HOT 3
- update module dependencies in code with side effects HOT 2
- Add a Windows CI integration HOT 1
- constructor without super call not removed
- Module state recorder does not allow to (re)define certain globals
- Transform fails for `export default 3;` HOT 1
- export default async function foo() does work any more in a module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lively.modules.