Thread overview
[Issue 9826] New: import doesn't work with absolute paths
Mar 28, 2013
Timothee Cour
Mar 29, 2013
Andrej Mitrovic
Mar 29, 2013
Andrej Mitrovic
Mar 29, 2013
Timothee Cour
Mar 29, 2013
Timothee Cour
March 28, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9826

           Summary: import doesn't work with absolute paths
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: timothee.cour2@gmail.com


--- Comment #0 from Timothee Cour <timothee.cour2@gmail.com> 2013-03-28 13:48:20 PDT ---
dmd -J. main.d //CT error
dmd -J/ main.d //works

main.d
----
void main(){enum x=import(__FILE__);}
----

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9826


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-03-29 06:59:42 PDT ---
Which OS? I'm seeing the opposite effect:

dmd -J. main.d // works
dmd -J/ main.d // CT error

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9826



--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-03-29 06:59:59 PDT ---
(In reply to comment #1)
> Which OS? I'm seeing the opposite effect:
> 
> dmd -J. main.d // works
> dmd -J/ main.d // CT error

Mine using Win7.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9826



--- Comment #3 from Timothee Cour <timothee.cour2@gmail.com> 2013-03-29 10:26:53 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > Which OS? I'm seeing the opposite effect:
> > 
> > dmd -J. main.d // works
> > dmd -J/ main.d // CT error
> 
> Mine using Win7.

OSX.
also, I actually meant compile with absolute path to main.d given to dmd:

dmd -J. /path/to/main.d //fails
dmd -J/ /path/to/main.d //works

so that __FILE__ is an absolute path

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9826



--- Comment #4 from Timothee Cour <timothee.cour2@gmail.com> 2013-03-29 10:36:53 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > Which OS? I'm seeing the opposite effect:
> > 
> > dmd -J. main.d // works
> > dmd -J/ main.d // CT error
> 
> Mine using Win7.

OSX.
also, I actually meant compile with absolute path to main.d given to dmd:

dmd -J. /path/to/main.d //fails
dmd -J/ /path/to/main.d //works

so that __FILE__ is an absolute path

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