<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 11, 2019 at 4:39 PM Matthew Woehlke &lt;<a href="mailto:mwoehlke.floss@gmail.com">mwoehlke.floss@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I&#39;m not sure what &quot;linearize&quot; means here? I&#39;m also not sure how it<br>
helps; until you know what generates that module, you can&#39;t build the TU<br>
that depends on it.<br>
<br></blockquote><div> Being able to do a linear scan without backtracking or keeping extra state, rather than finding the source interface unit that would generate the bmi to emit a dependency directly on it. <br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; and when you find the interface unit that produces module_name, write out<br>
&gt; the build dependency there.<br>
<br>
That&#39;s basically how CMake works for Fortran.<br>
<br>
&gt; This works less well for external dependencies.<br>
<br>
Well, for external dependencies, you just assume that the information<br>
how to generate their BMI&#39;s already exists (as per discussion in my<br>
previous message). If you don&#39;t find a module *at all*, that&#39;s a hard<br>
build error. Plausibly the collator could detect this, but I&#39;d be fine<br>
with the compiler just croaking because it can&#39;t import the module.<br>
<br>
&gt; There&#39;s also the additional complication that the imported module name may<br>
&gt; not exist yet. That should be a build error<br>
<br>
No, it should *work*. Again, this isn&#39;t a problem in the approach CMake<br>
uses for Fortran modules.<br>
<br></blockquote><div>If it doesn&#39;t exist because I&#39;m in the middle of adding it, or misspelled it, etc. There&#39;s lots of reasons incremental builds get invoked. This is equivalent to a missing header file. I might have not written it yet, or added the target dependency, or installed the package, etc. I don&#39;t mean the case where the bmi doesn&#39;t exist. That&#39;s the normal case. But the scanner can&#39;t assume that the build has built everything, so it has to be more forgiving. But that means more errors downstream. <br> </div></div></div>