Re: Cycle detected between modules with ctors/dtors

2015-03-06 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/4/15 4:15 PM, rumbu wrote: On Wednesday, 4 March 2015 at 16:08:00 UTC, Steven Schveighoffer wrote: curiously not listed? That doesn't make any sense. If there is not a cycle in the listed modules, where at least 2 modules have a static ctor or static dtor, then there is a bug in the cycle

Re: Cycle detected between modules with ctors/dtors

2015-03-04 Thread ketmar via Digitalmars-d-learn
On Wed, 04 Mar 2015 11:06:50 -0500, Steven Schveighoffer wrote: > Clearly, the above is not an issue, but at the moment, the code treats > having a ctor and having a dtor as the same thing. How to fix it? I'm > not exactly sure, you need to have the modules sorted according to ctor > and also acco

Re: Cycle detected between modules with ctors/dtors

2015-03-04 Thread rumbu via Digitalmars-d-learn
On Wednesday, 4 March 2015 at 16:08:00 UTC, Steven Schveighoffer wrote: curiously not listed? That doesn't make any sense. If there is not a cycle in the listed modules, where at least 2 modules have a static ctor or static dtor, then there is a bug in the cycle detection code. Source cod

Re: Cycle detected between modules with ctors/dtors

2015-03-04 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/3/15 4:24 PM, rumbu wrote: On Tuesday, 3 March 2015 at 18:55:49 UTC, Steven Schveighoffer wrote: Only one of the listed modules has a static contructor (system.globalization) and that constructor doesn't use any information from other modules. It's a complex problem. Because we don't co

Re: Cycle detected between modules with ctors/dtors

2015-03-03 Thread rumbu via Digitalmars-d-learn
Now I see: this "bug" is 7 years old, but is filled in for D1: https://issues.dlang.org/show_bug.cgi?id=2457 Does this mean it will be ignored for D2?

Re: Cycle detected between modules with ctors/dtors

2015-03-03 Thread rumbu via Digitalmars-d-learn
On Tuesday, 3 March 2015 at 18:55:49 UTC, Steven Schveighoffer wrote: Only one of the listed modules has a static contructor (system.globalization) and that constructor doesn't use any information from other modules. It's a complex problem. Because we don't control the linker, we cannot e

Re: Cycle detected between modules with ctors/dtors

2015-03-03 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/3/15 12:40 PM, rumbu wrote: I encountered the following error: First-chance exception: object.Exception Aborting: Cycle detected between modules with ctors/dtors: system.globalization -> internals.locale -> system.runtime.interopservices -> system.io -> system.globalizati

Cycle detected between modules with ctors/dtors

2015-03-03 Thread rumbu via Digitalmars-d-learn
I encountered the following error: First-chance exception: object.Exception Aborting: Cycle detected between modules with ctors/dtors: system.globalization -> internals.locale -> system.runtime.interopservices -> system.io -> system.globalization at src\rt\minfo.d(162) Onl

Re: Cycle detected between modules with ctors/dtors

2011-04-25 Thread Steven Schveighoffer
message when trying to run: Cycle detected between modules with ctors/dtors The cyclic module import code was changed significantly in 2.051, due to this bug: http://d.puremagic.com/issues/show_bug.cgi?id=4384 I would appreciate if you think the cycle is not correct to post a case of where

Re: Cycle detected between modules with ctors/dtors

2011-04-25 Thread Mandeep
modules with ctors/dtors The cyclic module import code was changed significantly in 2.051, due to this bug: http://d.puremagic.com/issues/show_bug.cgi?id=4384 I would appreciate if you think the cycle is not correct to post a case of where cycle detection is flagging a cycle that shouldn'

Re: Cycle detected between modules with ctors/dtors

2011-04-25 Thread Steven Schveighoffer
On Sat, 23 Apr 2011 04:34:39 -0400, Jonathan M Davis wrote: It happens when a module imports - directly or indirectly - another module which imports it - directly or indirectly - and they both have static constructors and/or static destructors (it _might_ not happen if one of them has st

Re: Cycle detected between modules with ctors/dtors

2011-04-25 Thread Steven Schveighoffer
On Sat, 23 Apr 2011 02:16:22 -0400, Mandeep wrote: Hi, I am trying to compile the code that was working with dmd 2.050 using dmd 2.052. The code compiles but it gives me errors with message when trying to run: Cycle detected between modules with ctors/dtors The cyclic module import

Re: Cycle detected between modules with ctors/dtors

2011-04-24 Thread Heinz
I haven't faced this myself. DMD is complaining about module Ctors and Dtors, so the bug must be there. But, i'm very curious about the scenario you mention, nested classes accessing its outer class: How are you referring the parent class from the child classes? Use the "outer" property of the chi

Re: Cycle detected between modules with ctors/dtors

2011-04-23 Thread Mandeep
On 04/23/2011 02:04 PM, Jonathan M Davis wrote: Hi, I am trying to compile the code that was working with dmd 2.050 using dmd 2.052. The code compiles but it gives me errors with message when trying to run: Cycle detected between modules with ctors/dtors This was not happening earlier with

Re: Cycle detected between modules with ctors/dtors

2011-04-23 Thread Jonathan M Davis
> Hi, > > I am trying to compile the code that was working with dmd 2.050 using > dmd 2.052. > > The code compiles but it gives me errors with message when trying to run: > > Cycle detected between modules with ctors/dtors > > This was not happening earlier with 2

Cycle detected between modules with ctors/dtors

2011-04-22 Thread Mandeep
Hi, I am trying to compile the code that was working with dmd 2.050 using dmd 2.052. The code compiles but it gives me errors with message when trying to run: Cycle detected between modules with ctors/dtors This was not happening earlier with 2.050. I am not able to produce a smaller test