Bug 2523 – [PATCH] fix rdmd to understand core.* libs
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2008-12-18T12:00:00Z
Last change time
2015-06-09T01:20:50Z
Keywords
patch
Assigned to
andrei
Creator
d
Comments
Comment #0 by d — 2008-12-18T12:00:24Z
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,
Comment #1 by andrei — 2008-12-18T12:58:25Z
Thanks, fixed in svn.
Comment #2 by sean — 2008-12-18T13:41:51Z
More generally, if a file has a ".di" extension then it shouldn't be compiled regardless.