[Issue 11330] Directory named as imported module should not stop module search

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 23 10:06:52 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11330



--- Comment #5 from Vladimir Panteleev <thecybershadow at gmail.com> 2013-10-23 20:06:50 EEST ---
(In reply to comment #4)
> It will break existing the code "import a;'in "src3/b.d". The occurred
> problem is contrary to the principle in DIP37- adding package.d should be
> breakage-free transparent change.

I understand that the goal is to avoid hijacking when a package.d file is
added. If that's the case, then the issue can be resolved by making the
compiler complain if it finds both a.d and a/package.d in its search paths.

However, if you think about it more, shouldn't the compiler also complain if it
finds more than one match in its search path? Because that is also a hijacking
opportunity - remove the first match, and suddenly the compiler "silently" is
using some other version of the module. But would making the compiler complain
about ambiguous search path matches break too many environments?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list