Bug 16242 – Sometimes dependencies are not properly stored/detected

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2016-07-06T16:02:39Z
Last change time
2024-12-13T18:48:53Z
Assigned to
No Owner
Creator
Steven Schveighoffer
Moved to GitHub: dmd#19156 →

Attachments

IDFilenameSummaryContent-TypeSize
1602cycledetector.dcycle detector programtext/plain1981

Comments

Comment #0 by schveiguy — 2016-07-06T16:02:39Z
Created attachment 1602 cycle detector program When looking at cycles (see issue 16211), a case appeared to only cause cycles on Windows, but in actuality was a cycle on all platforms. The root cause of the cycle not being detected is that the dependencies stored by dmd and/or detected by druntime did not include all the true dependencies. In druntime, I have added a special debug version that prints out all dependencies as they are encountered (see druntime src/rt/minfo.d, printModuleDependencies). I wrote a simple cycle detector that accepts the output from this to determine with brute force whether any cycles are present, without dealing with determining constructor order (attached). It did not see any cycles in the output from OSX. The cause of this is that std.internal.math.biguintcore only had one dependency, core.cpuid. However, it actually has several dependencies (one that caused the cycle on Windows). For some reason, either dmd is not putting the dependency into the module info, or druntime is not reading it. I'm not sure how to reduce this, but I'll see if I can find some time to figure this out. Note sure of the guilty party, so I picked dmd. Could also be druntime.
Comment #1 by robert.schadek — 2024-12-13T18:48:53Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19156 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB