[phobos] std.process and std.datetime - circular dependency on OSX

Jonathan M Davis jmdavisProg at gmx.com
Sat Oct 1 21:07:05 PDT 2011


On Saturday, October 01, 2011 20:34:45 Jonathan M Davis wrote:
> On Friday, September 30, 2011 20:16:33 Walter Bright wrote:
> > Both have static constructors. This wasn't detected before because of a
> > bug in dmd (now fixed).
> 
> std.process doesn't even import std.datetime, so I don't know why a circular
> dependency would even exist in this case. As usual, trying to figure out
> what's really going on with a circular dependency isn't going to be fun.

Ah. It looks like it's happening because std.exception uses std.datetime in 
its unit tests. Well, hopefully the same trick that std.file and std.stdio use 
should work with std.process as well. It would be really nice though to be 
able to just somehow mark one or both of the static constructors or modules to 
indicate that the initialization order doesn't matter (or to tell it which 
order to use if that's a better solution). I'll have a pull request with an 
attempted solution up shortly, but someone with a Mac is going to have to test 
it.

- Jonathan M Davis


More information about the phobos mailing list