Changes between Initial Version and Version 1 of Ticket #13826, comment 11


Ignore:
Timestamp:
12/14/12 08:38:24 (9 years ago)
Author:
nbruin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13826, comment 11

    initial v1  
    11OK, I don't know what we're supposed to do with whitespace anymore. I hope someone else can sign off on that.
    22
    3 Concerning the caching strategy: I'm not so sure the current code is particularly safe in the face of now-current development practices: If a cache file is present and contains an entry for a module that a lazy star import of that module will use that entry to initialize the namespace. I don't think the cache ever gets updated should it be discovered the data is out-of-sync.
     3Concerning the caching strategy: I'm not so sure the current code is particularly safe in the face of now-current development practices: If a cache file is present and contains an entry for a module then a lazy star import of that module will use that entry to initialize the namespace. I don't think the cache ever gets updated should it be discovered the data is out-of-sync.
    44
    55The cache-file is only specific to the "branch" of sage. Now that people mostly use mercurial queues, the branch name hardly identifies the particular sage version. In particular, if I apply a patch that changes a lazily imported module, the cache will not be marked as stale and I will continue working with that. The cache will be resaved upon startup (see `all.py`), but only the entries of modules that weren't in the cache before will be updated, because the cache is blindly trusted for the other ones.
     
    1010
    1111I realize that this is escalating the scope of this ticket a bit, but if `lazy_import` lies about objects available in the to-be-imported namespace (due to using a stale cache), we have a rather critical problem. I'm including Robert on the CC here in the hope he can explain why the current approach is safe.
     12
     13Or perhaps we should simply not do lazy star imports, only specific ones. Then the whole cache is not necessary.