Denis Koroskin wrote:
On Sat, 20 Dec 2008 15:39:08 +0300, Bill Baxter <[email protected]> wrote:
I'd love to have an unnecessary import finder tool. How does that work?
--bb
It's easy: remove an import and try if it still works :)
I recompile that file only and since all the imports are private, it
generally doesn't break other files.
The only exception - templates. They aren't fully analyzed until
instanciated and therefore some imports may be removed even if they are
necessary. A simple tag prevents an import from removal:
Some more exceptions:
* http://d.puremagic.com/issues/show_bug.cgi?id=313 ("Fully qualified
names bypass private imports")
* http://d.puremagic.com/issues/show_bug.cgi?id=314 ("Static, renamed,
and selective imports are always public")