Open Cogitri opened 4 years ago
To Reproduce:
create files main.d:
import a: print_in_a;
void main(string[] args) {
"test".print_in_a;
}
a.d:
module a;
import std.stdio: writeln;
public void print_in_a(T)(T arg) {
arg.writeln();
}
meson.build:
project('Test', ['d'])
src = [
'main.d',
'a.d'
]
executable('tt', src)
meson build && ninja -C build
./build/tt
output in console: test
change a.d to
module a;
import std.stdio: writeln;
public void print_in_a(T)(T arg) {
static assert(false);
arg.writeln();
}
execute ninja -C build
build> /usr/local/bin/ninja
[1/2] Compiling D object 'tt@exe/a.d.o'
[2/2] Linking target tt
after if execute ninja -C build clean && ninja -C build
:
../a.d(6): Error: static assert `false` is false
OS: Mint 19.3 tricia
meson --version 0.54.3
ninja --version 1.9.0.git.kitware.dyndep-1.jobserver-1
Describe the bug It appears that meson doesn't set the right file-dependencies in one project. So if I change file
test1.d
is in shared liba
andtest2.d
depends on the imports fromtest1.d
and is built against the shared liba
,test2.d
isn't rebuilt. This can cause really weird errors, e.g. when an Enum has changed intest1.d
and thefinal switch
(a construct which requires you to do an exhaustive match on an enum) intest2.d
doesn't complain about the change (e.g. an addition of a new enum member) because it isn't rebuiltTo Reproduce I'll make a toy-project to demo this in a bit.
Expected behavior Meson should rebuild
test2.d
too.system parameters Meson 0.54.0