VisualD solution (initially generated by dub) breaks if folder depth changes

Mike Parker via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Thu May 11 01:27:02 PDT 2017


On Thursday, 11 May 2017 at 05:37:29 UTC, MouseFace wrote:
> I used dub to generate a VisualD solution with the dependencies 
> I needed. Then I pushed it to a remote repository and then 
> cloned it to a new location on the same PC to see if it worked 
> out of the box... no such luck...
>
> I moved my original folder around and if I only change the 
> folder name everything works, but if I nest it deeper in the 
> file system I'll get errors like:
>
> Error: module sdl is in file 'derelict\sdl2\sdl.d' which cannot 
> be read	
>
> If I run "dub generate visuald" it fixes it, but I'm hoping 
> there's something else I can do that'll make it so my 
> collaborators and I can just "git pull" and not have to worry 
> about file paths getting messed up.

The idea behind 'dub generate' is that you distribute the 
dub.json/sdl file and generate the IDE project locally. This 
allows the generator to use the dependencies available in the 
default dub cache on the local system.

I haven't yet dug into the options for generate, nor do I know 
what the plans are for it, but I suggest you take this to the dub 
forum or perhaps file an issue for an enhancement request provide 
an option to pull dependencies into the project directory tree. 
That should allow for IDE configurations that can be distributed 
with the project.


More information about the Digitalmars-d-ide mailing list