www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2523] New: [PATCH] fix rdmd to understand core.* libs

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

           Summary: [PATCH] fix rdmd to understand core.* libs
           Product: D
           Version: 2.022
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: patch
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: andrei metalanguage.com
        ReportedBy: d brian.codekitchen.net


The rdmd inALibrary function doesn't know about the new core.* namespace, so it
tries to include memory.di and exception.di as source files for all
compilations, which results in duplicate definition errors.

I don't see any way to attach a file here while creating a ticket, so here's
the simple patch to fix:

--- /mnt/hgfs/Programming/rdmd.d        2008-07-07 22:10:58.000000000 -0600
+++ ./rdmd.d    2008-12-18 10:51:50.000000000 -0700
   -143,6 +143,7   
 {
     // Heuristics: if source starts with "std.", it's in a library
     return startsWith(source, "std.")
+        || startsWith(source, "core.")
         || source == "object" || source == "gcstats";
     // another crude heuristic: if a module's path is absolute, it's
     // considered to be compiled in a separate library. Otherwise,


-- 
Dec 18 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2523


andrei metalanguage.com changed:

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





Thanks, fixed in svn.


-- 
Dec 18 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2523






More generally, if a file has a ".di" extension then it shouldn't be compiled
regardless.


-- 
Dec 18 2008