Bug 11200 – RDMD adds import switch to dir name of first module, causing symbol clashes

Status
RESOLVED
Resolution
LATER
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-08T12:14:54Z
Last change time
2021-01-24T07:20:18Z
Assigned to
No Owner
Creator
Andrej Mitrovic

Comments

Comment #0 by andrej.mitrovich — 2013-10-08T12:14:54Z
Modules: foo/bar.d: ----- module foo.bar; import foo.std.exception; import std.range; ----- foo/std/exception.d: ----- module foo.std.exception; ----- Compiling from path where the "foo" folder is located in: $ dmd -main foo\bar.d > $ rdmd -main foo\bar.d C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\conv.d(26): Error: module foo.std.exception from file foo\std\exception.d must be imported as module 'foo.std.exception'
Comment #1 by andrej.mitrovich — 2013-10-08T12:17:30Z
I can see the problem, RDMD automatically adds the foo folder to the import list for some bizarre reason..: $ rdmd --chatty -main foo\bar.d ^"dmd^" ^"-main^" ^"-v^" ^"-o-^" ^"foo\bar.d^" ^"-Ifoo^" I should not add that import switch.
Comment #2 by andrej.mitrovich — 2013-10-08T12:17:39Z
(In reply to comment #1) > I can see the problem, RDMD automatically adds the foo folder to the import > list for some bizarre reason..: > > $ rdmd --chatty -main foo\bar.d > ^"dmd^" ^"-main^" ^"-v^" ^"-o-^" ^"foo\bar.d^" ^"-Ifoo^" > > I should not add that import switch. *It*
Comment #3 by maxhaton — 2021-01-24T07:20:18Z
Arguably beyond the scope of what rdmd is supposed to be for