www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9508] New: RDMD doesn't generate new dependency list when a file is changed.

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: jerro.public gmail.com


--- Comment #0 from jerro.public 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: -------
Feb 13 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9508



--- Comment #1 from github-bugzilla puremagic.com 2013-03-10 14:34:34 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/tools

https://github.com/D-Programming-Language/tools/commit/fa6ac0a8183ccc0bd8ebffe98260b3961b6c5d11
rdmd: Include root module in deps freshness check (Issue 9508)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 10 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9508


David Nadlinger <code klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code klickverbot.at


--- Comment #2 from David Nadlinger <code klickverbot.at> 2013-03-10 14:52:22
PDT ---
Should be fixed in Git master. Please re-open if the problem persists.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 10 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9508


David Nadlinger <code klickverbot.at> changed:

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


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 10 2013