Release D 2.072.0

Steven Schveighoffer via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Nov 3 08:51:22 PDT 2016


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


More information about the Digitalmars-d-announce mailing list