www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - VisualD solution (initially generated by dub) breaks if folder depth

reply MouseFace <vasdfs sads.com> writes:
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.

...and if anyone knows... why does my .dub/obj have so many 
nested dummy folders?
".dub\obj\debug\dummy\dummy\dummy\dummy"
Is that supposed to be like that? I feel like this might have 
something to do with my problem.

Thanks.
May 10
parent Mike Parker <aldacron gmail.com> writes:
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.
May 11