February 18, 2016
https://issues.dlang.org/show_bug.cgi?id=10378

--- Comment #32 from Steven Schveighoffer <schveiguy@yahoo.com> ---
(In reply to hsteoh from comment #31)
> So unqualified local imports are still extremely dangerous... :-(

I think we should point out wherever the docs are that say how local imports work that best practice is to use selective or renamed imports as local imports to avoid issues.

And then fix Phobos/Druntime to follow those recommendations :)

--
February 18, 2016
https://issues.dlang.org/show_bug.cgi?id=10378

--- Comment #33 from hsteoh@quickfur.ath.cx ---
There has been a steady stream of PRs, at least when I was active last year, that moved imports into local scope (to keep Phobos internal interdependencies under control) and turned local imports into scoped imports (to prevent hijacking).  If you find any other places in Phobos that has possibly-hijackable local imports, please file a bug or submit a PR. :-)

--
February 18, 2016
https://issues.dlang.org/show_bug.cgi?id=10378

--- Comment #34 from Steven Schveighoffer <schveiguy@yahoo.com> ---
What I mean is, really Timon's code should be:

string readAndLog(string filename){
    import std.file : readText;
    auto text=readText(filename);
    write(filename," read successfully!\n");
    return text;
}

i.e. only use scoped imports with a qualified list of which symbols you will use, or use a renamed import.

This prevents any hijacking.

--
February 18, 2016
https://issues.dlang.org/show_bug.cgi?id=10378

--- Comment #35 from timon.gehr@gmx.ch ---
(In reply to Steven Schveighoffer from comment #34)
> What I mean is, really Timon's code should be:
> 
> string readAndLog(string filename){
>     import std.file : readText;
>     auto text=readText(filename);
>     write(filename," read successfully!\n");
>     return text;
> }
> 
> i.e. only use scoped imports with a qualified list of which symbols you will use, or use a renamed import.
> 
> This prevents any hijacking.

Well, there's an arbitrary number of conventions that will prevent any
hijacking.
The point of my example was to expose a remaining flaw in the new import lookup
design.

--
June 16, 2016
https://issues.dlang.org/show_bug.cgi?id=10378

Sobirari Muhomori <dfj1esp02@sneakemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@dawg.eu

--- Comment #36 from Sobirari Muhomori <dfj1esp02@sneakemail.com> ---
*** Issue 12279 has been marked as a duplicate of this issue. ***

--
July 03, 2017
https://issues.dlang.org/show_bug.cgi?id=10378

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2@gmail.com

--- Comment #37 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
*** Issue 15819 has been marked as a duplicate of this issue. ***

--
August 02, 2017
https://issues.dlang.org/show_bug.cgi?id=10378

--- Comment #38 from github-bugzilla@puremagic.com ---
Commit pushed to dmd-cxx at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/e08bd01d142b0387d2d112a60503495f72f933ef Issue 10378 - Local imports hide local symbols

--
December 10, 2018
https://issues.dlang.org/show_bug.cgi?id=10378

Mike Franklin <slavo5150@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=19471

--
July 13, 2019
https://issues.dlang.org/show_bug.cgi?id=10378

--- Comment #39 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #10167 "Fixup date for removing check10378/bug10378 globals" was merged into master:

- 6da24d438a6b75ed0db8eb1a8b1f1b63318f19a6 by Geod24:
  Fixup date for removing check10378/bug10378 globals

  Introduced by 625c75a1b3.

https://github.com/dlang/dmd/pull/10167

--
1 2 3 4
Next ›   Last »