Thread overview
[Issue 2523] New: [PATCH] fix rdmd to understand core.* libs
Dec 18, 2008
d-bugmail
Dec 18, 2008
d-bugmail
Dec 18, 2008
d-bugmail
December 18, 2008
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,


-- 

December 18, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2523


andrei@metalanguage.com changed:

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




------- Comment #1 from andrei@metalanguage.com  2008-12-18 12:58 -------
Thanks, fixed in svn.


-- 

December 18, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2523





------- Comment #2 from sean@invisibleduck.org  2008-12-18 13:41 -------
More generally, if a file has a ".di" extension then it shouldn't be compiled regardless.


--