<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, 28 Nov 2025 at 16:19, Zoltan Somogyi <<a href="mailto:zoltan.somogyi@runbox.com">zoltan.somogyi@runbox.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On Fri, 28 Nov 2025 14:18:44 +1100, Julien Fischer <<a href="mailto:jfischer@opturion.com" target="_blank">jfischer@opturion.com</a>> wrote:<br>
> Actually, there is one problem here.  The compiler is now ignoring the<br>
> --no-warn-interface-imports<br>
> option and always printing a warning.<br>
<br>
Ok. The issue here is that we have TWO options that both seem to want<br>
to control whether this warnings is enabled:<br>
<br>
optdb(oc_warn_dodgy_mod, warn_unused_interface_imports, bool(yes),<br>
    % Not documented because its relationship with --warn-unused-imports<br>
    % is too complicated for users (and maybe even developers ...).<br>
    priv_help("warn-unused-interface-imports", [<br>
        w("Warn about modules that are imported in the interface"),<br>
        w("but not used there.")])).<br>
optdb(oc_warn_dodgy_mod, warn_interface_imports,       bool(yes),<br>
    help("warn-interface-imports", [<br>
        w("Do not warn about modules imported in the interface,"),<br>
        w("but which are not used in the interface.")])).<br>
<br>
The code that my diff modified<br>
<br>
- used warn_interface_imports to control whether we ran the code<br>
  that looked for unused interface imports, but then<br>
<br>
- used warn_unused_interface_imports, the other option, as the<br>
  option that controlled whether any generated warnings would<br>
  actually be printed.<br>
<br>
I saw the difference as a silent bug, and "fixed" it by making<br>
the first step use warn_unused_interface_imports as well.<br>
<br>
I am not sure whether this difference was ever intentional, and<br>
I don't plan to find out, because it does not matter. The duplication<br>
NOW is a problem, as you found out. These two options should<br>
clearly be merged, and to minimize disruption, it should be reachable<br>
by both its old names. The only question is: which is the name<br>
we should put first, i.e. which one's use should we encourage?<br>
<br>
I vote for --warn-unused-interface-imports, both because it better<br>
describes what it does, and because it has a more obvious connection<br>
to its bigger brother --warn-unused-imports. Any other votes?<br></blockquote><div><br></div><div>I also vote for --warn-unused-interface-imports.</div><div><br></div><div>Julien.</div></div></div>