[m-rev.] for post-commit review: stop using need_qualifier where it does not belong

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Nov 11 20:09:43 AEDT 2019



On Mon, 11 Nov 2019 16:57:54 +1100, Peter Wang <novalazy at gmail.com> wrote:
> I'm not really familiar with smart recompilation so this is a guess.

I think it is very likely to be a good guess.
 
> recomp_must_be_qualified is passed for modules imported via
> `use_module'?

Yes. That means that neither the original nor the renamed version
of this type can express the idea that a module may be "used in
the interface, but imported in the implementation". In other words,
this is another instance of the Mantis 401 bug :-(

Yes. It has the  
> check_for_simple_item_ambiguity_2 and a few similar predicates are,
> AFAICS, the only places RecompNeedQual is consulted.

Yes, I can verify that.

> I think the logic is something like this: if the module begins to
> `use_module m1' then that can NOT in of itself cause a previously
> unqualified name `f' to become ambiguous: `f' would never be qualified
> as `m1.f', therefore that is not a reason to force recompilation.
> 
> On the other hand, if the module begins to `import_module m2' then `f'
> MIGHT be qualified to `m2.f' in addition to whatever it was qualified to
> previously, therefore recompilation should not be skipped.

I will add a (paraphrase of) that as documentation, albeit marked as tentative,
mentioning 401.

Zoltan.


More information about the reviews mailing list