wilzbach / tools-test

1 stars 0 forks source link

rdmd ignores --exclude when -deps is provided #178

Closed wilzbach closed 6 years ago

wilzbach commented 6 years ago

Note: the issue was created automatically migrated from https://issues.dlang.org

Original bug ID: BZ#18042 From: Timothee Cour <timothee.cour2@gmail.com> Reported version: D2 CC: johnnymarler@gmail.com, timothee.cour2@gmail.com

wilzbach commented 6 years ago

Comment author: Timothee Cour <timothee.cour2@gmail.com>

adding -deps inside rdmd command below will print all dependencies inside bar.foo.fun; it shouldn't because we passed --exclude=bar

./setup.sh: build_lib(){ dmd -of=libfoo.a -lib bar/foo.d }

build_main(){ exe=./main

    rdmd --force -v --build-only -of$exe -L-lfoo -L-L. --exclude=bar main.d
    $exe

}

./main.d: import bar.foo; void main(){ fun(); }

./bar/foo.d: module bar.foo;

void fun(){ import std.stdio; writeln("ok1"); }

wilzbach commented 6 years ago

Comment author: Jonathan Marler <johnnymarler@gmail.com>

Just wanted to make a note that we should retest this bug once this PR is integrated.

https://github.com/dlang/tools/pull/271

wilzbach commented 6 years ago

Comment author: Jonathan Marler <johnnymarler@gmail.com>

Fixed with: https://github.com/dlang/tools/pull/271