Work on #505 <https://github.com/leo-editor/leo-editor/issues/505> seems to be going well, if in some unexpected directions.
Here are some notes about the new-read branch: The *acid test* for switching branches is to ensure that after switching branches it's possible to do write-at-file-nodes on the top-level Code node without changing any external file. At present, this is failing rather badly. The new_read switch in both leoAtFile.py and leoCache.py marks the new code. There are, thankfully, very few changes. It was straightforward to eliminate recovered nodes, and I still think this is the right thing to do. However, this is debatable. In any case, this is "merely" a user interface issue. The real problems seem to involve caching: 1. It appears that cacher.createOutlineFromCacheList still uses the "last clone wins" rule, which can lead to all sorts of confusion. I hope to stamp out this rule later today. Happily, I now have an easy way to detect this error, one that does not involve recovered nodes. I simply make a change to a clone in one branch, switch to another branch, and see whether the change in the other branch has "bled" into the new branch. The new read-test branch makes it possible to run lots of tests like this without affecting master. 2. I have already fixed an extremely confusing caching buglet. Previously (and still, in master) Leo cached @file nodes only when *reading* a file not in the cache. How bizarre is that!?! So Leo would re-read @file nodes (once) after they had been previously saved. Sheesh. Now, Leo does the obvious, correct, thing. It caches @file nodes when writing them—the next time that Leo reads the external file, Leo will find the file in the cache. Doh! Fixing this is much more than speeding up Leo. Now Leo works as one has a right to expect. This is important while tracking down unwanted read-logic behavior. *Summary* Work is going well, with only a few changed methods. I hope to get the new read code working in all but the extremely rare cases later today. Recovered nodes provide the illusion of reliability. We need the real thing. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" 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 https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
