Thank you very much Jeremy for describing the issues that need to be considered. This really helps me understanding TW5 better. It's the incredible dynamic and flexible behavior of TW5 that makes me pondering about module hot plugging, but not general module hot plugging, but for macros, parser extensions, and those other modules where I may get away with triggering a rerendering. You mention some caching in the boot kernel ... would that "interfere" with hot plugging those simpler modules? Is there a way at this time to reparse and thus rerender the story view and also the other UI parts without loosing too much state? I have to admit that even after reading the architecture documents I still don't fully understand the main core functions, that is, how it keeps certain dependencies and uses them for selective updates. So please bear with me asking about the core...
Am Samstag, 27. September 2014 10:30:21 UTC+2 schrieb Jeremy Ruston: > > > changing a stylesheet tiddler immediately becomes live. Unfortunately, > this isn't yet the case when editing a module tiddler. I can understand > that this wasn't on the requirements list so far as the traditional > development cycles involves external code editors and reloading. > > The problem doesn't really have anything to do with the "traditional > development cycle". The issue is that reloading a module isn't in general > semantically well defined - any more than it would be under Node.js. The > side effects of executing a module are strictly limited to returning the > exported properties; there's no problem with re-executing a tiddler to get > a revised set of exports, but the issue is what one would do with those > exports (actually, there is an issue: as with Node.js, the exports of a > module are cached by the boot kernel). > > Each type of module is used differently. Consider dynamically updating a > parser module: one would expect that all tiddlers would need to be reparsed > (and the page template re-rendered) in order to apply the modified parsing > behaviour. Or consider a modified deserialiser module: all tiddlers would > need to be deserialised afresh to assimilate the change. > > Clearly, one can imagine some modules that could be hot-swapped, but I > don't think that could be done reliably with any of the module types > included in the core. If one introduced a new module type that was > semantically amenable to hot swapping there's nothing stopping the code > that manages those modules from supporting it. > > In general, the only reliable way to assimilate a module change is a > restart. Conceivably one could implement a sort of warm restart in the boot > kernel, but it would have to do almost everything that a cold restart does. > > Best wishes > > Jeremy. > > > > > > On Fri, Sep 26, 2014 at 9:35 AM, TheDiveO <[email protected] > <javascript:>> wrote: > >> On Thursday, September 25, 2014 11:05:27 PM UTC+2, Andreas Hahn wrote: >>> >>> I think the easiest way to do this is to trigger a refresh/reboot and >>> it is also a way that is least intrusive towards the TW architecture. The >>> refresh would have to maintain the current story view, but i think thats >>> doable. >>> >> >> This (reload) is exactly what I want to avoid while in the Third Flow. >> >> >>> The second possibility would be to re-evaluate parts of the boot >>> process, but I have no idea how much you would actually need to do here. >>> >> >> It is clear to me that reevaluation is not possible under all >> circumstances, but most of the development I did so far were about neatly >> encapsulated and (mostly) independent modules, so reevaluation seems to be >> perfectly within reach. So my question is about whether this may be >> possible already but hasn't yet been triggered so far. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "TiddlyWikiDev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/tiddlywikidev. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Jeremy Ruston > mailto:[email protected] <javascript:> > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywikidev. For more options, visit https://groups.google.com/d/optout.
