<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in module.modulemap</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>57a2eaf3 - Revert &quot;[modules] Do not cache invalid state for modules that we attempted to load.&quot;</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/Modules/Inputs/implicit-invalidate-chain/module.modulemap#57a2eaf3</link>
        <description>Revert &quot;[modules] Do not cache invalid state for modules that we attempted to load.&quot;As per comment on https://reviews.llvm.org/D72860, it is suggested torevert this change in the meantime, since it has introduced regression.This reverts commit 83f4c3af021cd5322ea10fd1c4e839874c1dae49.

            List of files:
            /llvm-project-15.0.7/clang/test/Modules/Inputs/implicit-invalidate-chain/module.modulemap</description>
        <pubDate>Tue, 10 Mar 2020 17:59:26 +0000</pubDate>
        <dc:creator>Rumeet Dhindsa &lt;rdhindsa@google.com&gt;</dc:creator>
    </item>
<item>
        <title>0a2be46c - Modules: Invalidate out-of-date PCMs as they&apos;re discovered</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/Modules/Inputs/implicit-invalidate-chain/module.modulemap#0a2be46c</link>
        <description>Modules: Invalidate out-of-date PCMs as they&apos;re discoveredLeverage the InMemoryModuleCache to invalidate a module the first timeit fails to import (and to lock a module as soon as it&apos;s built orimported successfully).  For implicit module builds, this optimizesimporting deep graphs where the leaf module is out-of-date; see examplenear the end of the commit message.Previously the cache finalized (&quot;locked in&quot;) all modules imported so farwhen starting a new module build.  This was sufficient to preventloading two versions of the same module, but was somewhat arbitrary andhard to reason about.Now the cache explicitly tracks module state, where each module must beone of:- Unknown: module not in the cache (yet).- Tentative: module in the cache, but not yet fully imported.- ToBuild: module found on disk could not be imported; need to build.- Final: module in the cache has been successfully built or imported.Preventing repeated failed imports avoids variation in builds based onshifting filesystem state.  Now it&apos;s guaranteed that a module is loadedfrom disk exactly once.  It now seems safe to removeFileManager::invalidateCache, but I&apos;m leaving that for a later commit.The new, precise logic uncovered a pre-existing problem in the cache:the map key is the module filename, and different contexts use differentfilenames for the same PCM file.  (In particular, the testModules/relative-import-path.c does not build without this commit.r223577 started using a relative path to describe a module&apos;s basedirectory when importing it within another module.  As a result, themodule cache sees an absolute path when (a) building the module orimporting it at the top-level, and a relative path when (b) importingthe module underneath another one.)The &quot;obvious&quot; fix is to resolve paths using FileManager::getVirtualFileand change the map key for the cache to a FileEntry, but some contexts(particularly related to ASTUnit) have a shorter lifetime for theirFileManager than the InMemoryModuleCache.  This is worth pursuingfurther in a later commit; perhaps by tying together the FileManager andInMemoryModuleCache lifetime, or moving the in-memory PCM storage into aVFS layer.For now, use the PCM&apos;s base directory as-written for constructing thefilename to check the ModuleCache.Example=======To understand the build optimization, first consider the build of amodule graph TU -&gt; A -&gt; B -&gt; C -&gt; D with an empty cache:    TU builds A&apos;       A&apos; builds B&apos;          B&apos; builds C&apos;             C&apos; builds D&apos;                imports D&apos;          B&apos; imports C&apos;             imports D&apos;       A&apos; imports B&apos;          imports C&apos;          imports D&apos;    TU imports A&apos;       imports B&apos;       imports C&apos;       imports D&apos;If we build TU again, where A, B, C, and D are in the cache and D isout-of-date, we would previously get this build:    TU imports A       imports B       imports C       imports D (out-of-date)    TU builds A&apos;       A&apos; imports B          imports C          imports D (out-of-date)          builds B&apos;          B&apos; imports C             imports D (out-of-date)             builds C&apos;             C&apos; imports D (out-of-date)                builds D&apos;                imports D&apos;          B&apos; imports C&apos;             imports D&apos;       A&apos; imports B&apos;          imports C&apos;          imports D&apos;     TU imports A&apos;        imports B&apos;        imports C&apos;        imports D&apos;After this commit, we&apos;ll immediateley invalidate A, B, C, and D when wefirst observe that D is out-of-date, giving this build:    TU imports A       imports B       imports C       imports D (out-of-date)    TU builds A&apos; // The same graph as an empty cache.       A&apos; builds B&apos;          B&apos; builds C&apos;             C&apos; builds D&apos;                imports D&apos;          B&apos; imports C&apos;             imports D&apos;       A&apos; imports B&apos;          imports C&apos;          imports D&apos;    TU imports A&apos;       imports B&apos;       imports C&apos;       imports D&apos;The new build matches what we&apos;d naively expect, pretty closely matchingthe original build with the empty cache.rdar://problem/48545366llvm-svn: 355778

            List of files:
            /llvm-project-15.0.7/clang/test/Modules/Inputs/implicit-invalidate-chain/module.modulemap</description>
        <pubDate>Sat, 09 Mar 2019 17:44:01 +0000</pubDate>
        <dc:creator>Duncan P. N. Exon Smith &lt;dexonsmith@apple.com&gt;</dc:creator>
    </item>
</channel>
</rss>
