www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11243] New: [REG2.064beta] "dmd -of" fails

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11243

           Summary: [REG2.064beta] "dmd -of" fails
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: gassa mail.ru



I try to compile any program, say "a.d", with DMD 2.064 beta on Windows.  I
specify the binary name with the following command line:
-----
dmd -ofa.exe a.d
-----

It says the following:
-----
Error: importing package 'object' requires a 'package.d' file which cannot be
found in 'object\package.d'
import path[0] = C:\Tools\dmd\windows\bin\..\..\src\phobos
import path[1] = C:\Tools\dmd\windows\bin\..\..\src\druntime\import
-----
Here, "C:\Tools\dmd" is a valid path to DMD 2.064 beta.

Minimal program, just in case:
-----
void main ()
{
}
-----

The same command line works fine with DMD 2.063.2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 13 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11243


rswhite4 googlemail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rswhite4 googlemail.com



Looks like my bug:
http://forum.dlang.org/thread/bug-11241-3 http.d.puremagic.com%2Fissues%2F

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 13 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11243


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com



15:16:11 PDT ---
I cannot reproduce this problem.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 14 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11243





 I cannot reproduce this problem.
Even not with my code? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 14 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11243





 I cannot reproduce this problem.
Sorry, I got the minimal test case wrong. It turns out that it can be reproduced exactly when you have directory "object" in the directory where you are compiling "a.d". The contents of the directory do not seem to matter, it can be empty. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 14 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11243


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID





 I cannot reproduce this problem.
Sorry, I got the minimal test case wrong. It turns out that it can be reproduced exactly when you have directory "object" in the directory where you are compiling "a.d". The contents of the directory do not seem to matter, it can be empty.
This is invalid issue, as same as bug 11241. The root package name 'object' is reserved for druntime. In this case, the 'object/' directory under the current directly hides druntime object.d module. The conflict error is expected behavior. See also the detailed answer for bug 11241. http://d.puremagic.com/issues/show_bug.cgi?id=11241#c1 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 14 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11243






 It turns out that it can be reproduced exactly when you have directory "object"
 in the directory where you are compiling "a.d".
 
 The contents of the directory do not seem to matter, it can be empty.
This is invalid issue, as same as bug 11241. The root package name 'object' is reserved for druntime. In this case, the 'object/' directory under the current directly hides druntime object.d module. The conflict error is expected behavior. See also the detailed answer for bug 11241. http://d.puremagic.com/issues/show_bug.cgi?id=11241#c1
Hmm, I see. My use case is compile script in the root, "binary" for .exe, "object" for .obj files, "source" for .d sources, etc. The name seems common enough to consider some further action though: 1. Is there a way to override this behavior by putting path to standard things like object.d before current directory path? 2. What if the standard-things-first order were the default, as we essentially must not have local modules named "object.d" or "core/memory.d" anyway? If we do that on purpose to override the default modules' behavior, we must be aware of what we are doing, and only then we will change the order of paths explicitly. 3. In any case, it is rather cryptic now, the error message and/or documentation can perhaps be improved. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 15 2013