Release D 2.072.0

Steven Schveighoffer via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Nov 10 05:58:56 PST 2016


On 11/10/16 8:26 AM, Dicebot wrote:
> On 11/03/2016 05:51 PM, Steven Schveighoffer wrote:
>> 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.
>
> It does not justify immediate breaking change.

> What should have been
> done instead:
>
> - Keep old behavior by default by default but print non-fatal runtime
> message that cycles are detected.

This is not possible. Old behavior DID detect some cycles. The new 
algorithm detects ALL cycles, and handles them all in the same way. What 
you are asking is for cycles detected by old algorithm to fail, but ones 
that wouldn't have been detected to pass. Not to mention that the order 
of ctor execution is not guaranteed to be the same (i.e. some latent bug 
may be hiding there).

Only possibility is just to ignore ALL cycles, and print them if any are 
detected.

> I presume I have to look for commits that implement
> http://dlang.org/changelog/2.072.0.html#drt-oncycle to fixup this?

The PR for this was here: https://github.com/dlang/druntime/pull/1668

-Steve


More information about the Digitalmars-d-announce mailing list