[Issue 9508] New: RDMD doesn't generate new dependency list when a file is changed.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 13 16:41:04 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9508
Summary: RDMD doesn't generate new dependency list when a file
is changed.
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: jerro.public at gmail.com
--- Comment #0 from jerro.public at gmail.com 2013-02-13 16:41:03 PST ---
Steps to reproduce:
1. Make a file a.d with this content:
module a;
void foo(){}
void main()
{
foo();
}
2. Run this:
rdmd a
3. Replace the content of a.d with this:
module a;
import b;
void main()
{
foo();
}
and create a file b.d with this content:
module b;
void foo(){}
4. run this:
rdmd --chatty a
The command outputs:
'dmd' '-of/tmp/.rdmd-1000/rdmd-a.d-8707821320FFD4E4D80A6FA8EAD4B975/a'
'-od/tmp/.rdmd-1000/rdmd-a.d-8707821320FFD4E4D80A6FA8EAD4B975/objs' '-I.' 'a.d'
/tmp/.rdmd-1000/rdmd-a.d-8707821320FFD4E4D80A6FA8EAD4B975/objs/a.o: In function
`_Dmain':
a.d:(.text._Dmain+0x5): undefined reference to `_D1b3fooFZv'
collect2: error: ld returned 1 exit status
--- errorlevel 1
You can see that rdmd didn't ran "dmd -v ..." to get a new dependency list. It
used the old list which doesn't contain b.d. That resulted in a linker error.
If you now run:
rdmd --force a
it succeeds.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list