library dependencies nightmare, D edition

Marcel marcelpi97 at gmail.com
Tue Feb 25 22:55:30 UTC 2020


On Tuesday, 25 February 2020 at 22:35:07 UTC, Steven 
Schveighoffer wrote:
> On 2/25/20 5:26 PM, Marcel wrote:
>> 
>> I can't give you the actual error messages right now, but both 
>> libraries have packages that define modules with the same 
>> name. For example, both libraries have packages with a module 
>> called "utility.d". Unfortunately, this isn't the only thing 
>> that causes compilation to fail though.
>
> is this imported via:
>
> import utility;
>
> ? or is it
>
> import packagea.utility;
>
> ?
>
> If the former, then that is definitely a problem I think. Two 
> libraries can have the same package name, but cannot have the 
> same top-level module name (you can't split modules).
>
> But I think you might have a different error for that condition.
>
> Make sure that whatever module it is complaining about has a 
> correct module declaration in both libraries.
>
> i.e. even if you have:
>
> packagea/utility.d
> packageb/utility.d
>
> and you import via:
>
> import packagea.utility;
>
> make sure packagea/utility.d has the module declaration:
>
> module packagea.utility;
>
> -Steve

The issue isn't with the module declaration, it is declared and 
imported as package1.utility. I think its an issue with VisualD's 
feature of adding import paths of project dependencies...



More information about the Digitalmars-d-learn mailing list