[dmd-internals] Why are there suddenly tons of deprecation messages about imports in Phobos?
ZombineDev via dmd-internals
dmd-internals at puremagic.com
Sat Feb 20 16:38:20 PST 2016
On Sunday, 21 February 2016 at 00:07:38 UTC, Jonathan M Davis
wrote:
> What exactly has changed with the import rules? There are now a
> _ton_ of deprecation messages being printed out when building
> phobos which are talking about static imports. For instance,
>
> std/string.d(5692): Deprecation: module std.utf is not
> accessible here, perhaps add 'static import std.utf;'
>
> The corresponding line is
>
> nextt = std.utf.decode(to, i);
>
> And not only is std.utf imported at the beginning of the
> function, it's imported explicitly:
>
> import std.utf : decode;
>
> Does this have something to do with the recent changes to try
> and deal with local imports not shadowing stuff? In this
> particular case, there is no local variable named decode, and
> when decode is used, its full import path is used and not just
> its name. Is this behavior intended? And what exactly is going
> on that the compiler suddenly wants lots of static imports?
>
> - Jonathan M Davis
These happened:
https://github.com/D-Programming-Language/dmd/pull/5426 - fix
Issue 313 - Fully qualified names bypass private imports
https://github.com/D-Programming-Language/dmd/pull/5445 -fix
Issue 10378 - Local imports hide local symbols
I think similar cases were discussed in the comments on those
pull requests.
More information about the dmd-internals
mailing list