www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Local module dependancy using dub

reply Winfred Raj <winfred.raj gmail.com> writes:
Hello all,
I created a project using dub init and got it successfully built 
with main as the entry point. Dxml was a dependency which was 
used here.

Now I have started another gtkd project using dub init and here I 
would like to import the first project. How do I go about doing 
this??

Best regards,
Winfred Raj
Oct 01 2021
next sibling parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Friday, 1 October 2021 at 20:59:40 UTC, Winfred Raj wrote:
 Hello all,
 I created a project using dub init and got it successfully 
 built with main as the entry point. Dxml was a dependency which 
 was used here.

 Now I have started another gtkd project using dub init and here 
 I would like to import the first project. How do I go about 
 doing this??

 Best regards,
 Winfred Raj
iirc, something like: ```json "dependencies": { "your-proj":{"path":"../your-proj/"} } ```
Oct 01 2021
parent Winfred Raj <winfred.raj gmail.com> writes:
On Friday, 1 October 2021 at 21:15:54 UTC, Imperatorn wrote:
 On Friday, 1 October 2021 at 20:59:40 UTC, Winfred Raj wrote:
 Hello all,
 I created a project using dub init and got it successfully 
 built with main as the entry point. Dxml was a dependency 
 which was used here.

 Now I have started another gtkd project using dub init and 
 here I would like to import the first project. How do I go 
 about doing this??

 Best regards,
 Winfred Raj
iirc, something like: ```json "dependencies": { "your-proj":{"path":"../your-proj/"} } ```
Thanks for the reply. ../xml_test_d/source/app.d is the relative path of the file which I want to reuse. In the dependency, I have entered the path (as explained by you) pointing to the xml_test_d folder. Now in my current project what should I import? Should it be "import xml_test_d" or "import app" or import xml_test_d.source.d" or something else?? Best regards, Winfred Raj
Oct 01 2021
prev sibling parent Winfred Raj <winfred.raj gmail.com> writes:
On Friday, 1 October 2021 at 20:59:40 UTC, Winfred Raj wrote:
 Hello all,
 I created a project using dub init and got it successfully 
 built with main as the entry point. Dxml was a dependency which 
 was used here.

 Now I have started another gtkd project using dub init and here 
 I would like to import the first project. How do I go about 
 doing this??

 Best regards,
 Winfred Raj
Correction - > I meant import xml_test_d.source.app and not import xml_test_d.source.d Best regards, Winfred Raj
Oct 01 2021