D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17198 - rdmd does not recompile when --extra-file is added
Summary: rdmd does not recompile when --extra-file is added
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: tools (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: ag0aep6g
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2017-02-19 16:52 UTC by Berni
Modified: 2017-08-10 11:40 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Berni 2017-02-19 16:52:34 UTC
test.d:

module test;

import std.stdio;

void main()
{
    B tmp = cast(B)Object.factory("test2.BB");
    tmp.m1();
}

interface A   { abstract void m1(); }
interface B:A { abstract void m2(); }
class AA:A    { override void m1() { writeln("A"); } }


test2.d:

module test2;

import std.stdio;
import test;

class BB:AA,B { override void m2() { writeln("B"); } }


And here is what I get when compiling:

$> rdmd test.d
segmentation fault
$> rdmd --extra-file=test2.d test.d
segmentation fault
$> rm -rf /tmp/.rdmd-1000/
$> rdmd --extra-file=test2.d test.d
A

Using --chatty on the second invocation shows, that no recompilation takes place.

$> rdmd --version
rdmd build 20170122
[...]
Comment 1 ag0aep6g 2017-02-20 10:47:22 UTC
Simplified test case:

test.d:
----
int x = 1;
int main() { return x; }
----

test2.d:
----
import test;
static this() { x = 0; }
----

rdmd invocations as before.

Fix: https://github.com/dlang/tools/pull/218
Comment 2 ag0aep6g 2017-02-20 14:32:02 UTC
(In reply to ag0aep6g from comment #1)
> Fix: https://github.com/dlang/tools/pull/218

Superseded by <https://github.com/dlang/tools/pull/219>.
Comment 3 github-bugzilla 2017-02-26 01:40:10 UTC
Commits pushed to stable at https://github.com/dlang/tools

https://github.com/dlang/tools/commit/5ffca7b0e097644fbcffbee8ba755e4ae48c9d9f
fix issue 17198 - rdmd does not recompile when --extra-file is added

https://github.com/dlang/tools/commit/790b223fd22193c7c7ef4d65bd3db226da800450
Merge pull request #219 from aG0aep6G/17198

fix issue 17198 - rdmd does not recompile when --extra-file is added
Comment 4 github-bugzilla 2017-03-05 01:57:38 UTC
Commits pushed to master at https://github.com/dlang/tools

https://github.com/dlang/tools/commit/5ffca7b0e097644fbcffbee8ba755e4ae48c9d9f
fix issue 17198 - rdmd does not recompile when --extra-file is added

https://github.com/dlang/tools/commit/790b223fd22193c7c7ef4d65bd3db226da800450
Merge pull request #219 from aG0aep6G/17198
Comment 5 github-bugzilla 2017-08-10 11:40:50 UTC
Commits pushed to newCTFE at https://github.com/dlang/tools

https://github.com/dlang/tools/commit/5ffca7b0e097644fbcffbee8ba755e4ae48c9d9f
fix issue 17198 - rdmd does not recompile when --extra-file is added

https://github.com/dlang/tools/commit/790b223fd22193c7c7ef4d65bd3db226da800450
Merge pull request #219 from aG0aep6G/17198