On 11/3/16 10:49 AM, Johan Engelen wrote:
On Wednesday, 2 November 2016 at 15:13:43 UTC, anonymous wrote:
On Wednesday, 2 November 2016 at 15:08:26 UTC, anonymous wrote:


I confirm, dmd 2.072 can't build dmd 2.071.2, same error, but boot
since master straping works there's probably something that's been
fixed in one or two of these ddmd modules, likely a static ctor...

Maybe after this:

https://github.com/dlang/dmd/commit/1d0ab8b9c136e46bf449c506ca25d2c8a784f7b9#diff-b4674e7b5d3a44178526afdefc9aa368


ddmd.attribs was removed

https://github.com/dlang/dmd/commit/1d0ab8b9c136e46bf449c506ca25d2c8a784f7b9#diff-b4674e7b5d3a44178526afdefc9aa368L15


and it was also part of the cycle.

Thanks for the detective work.
I wonder where the bug is: in 2.071 or in 2.072 :)

Any cycles that are "newly discovered" were already there. What was happening is that the runtime did not detect the cycle, and was arbitrarily choosing an order for initializing these modules. Either a) the arbitrary order happened to be right, or b) the order didn't matter. Most of the time it's b, because most static ctors don't depend on externally initialized items.

Note that the push to remove imports to packages and instead import more specific submodules (i.e. import std.range.primitives instead of std.range) also plays a factor (it's how I discovered the cycles were broken). I doubt there was much of that in dmd front end.

-Steve
  • Re: Release D 2.072.0 Ali Çehreli via Digitalmars-d-announce
  • Re: Release D 2.072.0 Basile B. via Digitalmars-d-announce
  • Re: Release D 2.072.0 Johan Engelen via Digitalmars-d-announce
    • Re: Release D 2.072.0 Andrei Alexandrescu via Digitalmars-d-announce
      • Re: Release D 2.0... Johan Engelen via Digitalmars-d-announce
        • Re: Release D... anonymous via Digitalmars-d-announce
          • Re: Relea... anonymous via Digitalmars-d-announce
            • Re: ... Johan Engelen via Digitalmars-d-announce
              • ... Steven Schveighoffer via Digitalmars-d-announce
              • ... Johan Engelen via Digitalmars-d-announce
              • ... Johan Engelen via Digitalmars-d-announce
              • ... Jonathan M Davis via Digitalmars-d-announce
              • ... Dicebot via Digitalmars-d-announce
              • ... Steven Schveighoffer via Digitalmars-d-announce
              • ... Dicebot via Digitalmars-d-announce
              • ... Kagamin via Digitalmars-d-announce
              • ... Nick Sabalausky via Digitalmars-d-announce
              • ... Dicebot via Digitalmars-d-announce
              • ... Steven Schveighoffer via Digitalmars-d-announce

Reply via email to