Dub Packages not working with lastest DMD

lawrence via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Sat Feb 18 13:32:35 PST 2017


On 02/18/2017 12:20 PM, Jolly James wrote:

This problem happens because the std.experimental.allocator.common file 
and the std.typecons file both define a Ternary struct and the 
std.experimental.allocator.package file imports both of this files.
The short term solution is to open the package.d file in you dub 
packages ... folder and fully qualify every usage of the Ternary 
identifier with std.experimental.allocator.common.Ternary instead of 
"Ternary" with find & replace.

Both Ternary definition seem identical to me but you can not fully 
qualify them with std.typecons.Ternary because the last two usages 
require the definition in the common.d file for some reason I got two 
new errors when I tried that.

The long term solution would be for either Andrei or Brian to rename 
their Ternary stucts, as Andrei points out it does of other names such 
as Trinary. I suppose also that Brian could decide which Ternary 
definition he wants to use, instead of importing both although he may 
need other things is both imports besides Ternary.

> A lot (if not all) dub packages by Brian Schott (Hackerpilot) do not
> compile using the latest stable DMD. Maybe someone can fix these or tell
> Brian.
>
> In order to use them I had to downgrade to DMD v2.071.2.
>
> The errors look like:
>
>> dub\packages\experimental_allocator-2.70.0-b1\experimental_allocator\src\std\experimental\allocator\package.d(322,
>> 13):
>>
>> Error: std.experimental.allocator.common.Ternary at
>>
>> dub\packages\experimental_allocator-2.70.0-b1\experimental_allocator\src\std\experimental\allocator\common.d(14,
>> 1)
>>
>> conflicts with std.typecons.Ternary at [...]
>
> And as his DCD is required for almost all plugins for generic text
> editors (VSCode, IntelliJ) to support D, this is a great problem.




More information about the Digitalmars-d-ide mailing list