Bug 22268 – rdmd does not track dependencies properly for --extra-file

Status
NEW
Severity
major
Priority
P2
Component
tools
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-09-02T22:08:52Z
Last change time
2022-12-17T10:39:01Z
Assigned to
No Owner
Creator
deadalnix

Comments

Comment #0 by deadalnix — 2021-09-02T22:08:52Z
$ rdmd -m64 -Isrc -w -debug -g -unittest -i --extra-file=src/module1.d --extra-file=src/module2.d --eval="/* Do nothing */" This run, while properly running the unittests in the proper modules, will generate a faulty dependency file that only contain standard library and druntime stuff. The same happens when using a module instead an --eval, in which case, only the dependency of that module are tracked properly, and the dependencies of the modules added via --extra-file remain untracked. This is a major issue as it leads rdmd to reuse cache entries when it shouldn't and run outdated code.