www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Best Practice to manage large projects with dub?

reply Ozan =?UTF-8?B?U8O8ZWw=?= <ozan.sueel gmail.com> writes:
Hi
My situation: I'm working on and with many projects based on many 
libraries. I know how to handle these in Git, GitHub and Dub. But 
what would be the Best Practice in current dub?

Let's say, we have many apps (1 app = 1 package), which use 
several libs (Every app has his own set of used libs, some are 
overlapping with other apps), every lib requires new libs to work 
(some are overlapping),and so on.

Let's say we want to have 10 apps and need in sum 100 packages 
with every possible combinations.

One way would be, to pump the dub package manager with 100 new 
packages for building only 10 apps. I would like to avoid fill 
the dub database with small packages it. An deprecated way is to 
combine dub with github, which still works fine to me.

What would be good way to manage many small libs to build few big 
apps? Maybe the solution is around the corner, but better to ask 
the experts.

Thanks in advance

Greetings, Ozan
May 13 2022
next sibling parent max haughton <maxhaton gmail.com> writes:
On Friday, 13 May 2022 at 17:51:55 UTC, Ozan Süel wrote:
 Hi
 My situation: I'm working on and with many projects based on 
 many libraries. I know how to handle these in Git, GitHub and 
 Dub. But what would be the Best Practice in current dub?

 Let's say, we have many apps (1 app = 1 package), which use 
 several libs (Every app has his own set of used libs, some are 
 overlapping with other apps), every lib requires new libs to 
 work (some are overlapping),and so on.

 Let's say we want to have 10 apps and need in sum 100 packages 
 with every possible combinations.

 One way would be, to pump the dub package manager with 100 new 
 packages for building only 10 apps. I would like to avoid fill 
 the dub database with small packages it. An deprecated way is 
 to combine dub with github, which still works fine to me.

 What would be good way to manage many small libs to build few 
 big apps? Maybe the solution is around the corner, but better 
 to ask the experts.

 Thanks in advance

 Greetings, Ozan
I would highly recommend keeping these small libs in a common repository (a monorepo if you will) but in a manner that only what is needed is required. Lots of projects/repositories/dub.jsons == pain
May 13 2022
prev sibling parent Salih Dincer <salihdb hotmail.com> writes:
On Friday, 13 May 2022 at 17:51:55 UTC, Ozan Süel wrote:
 Hi
 My situation: I'm working on and with many projects based on 
 many libraries. I know how to handle these in Git, GitHub and 
 Dub. But what would be the Best Practice in current dub?
 [...]
I think you should stay away from Dub on big business. Instead, take advantage of all the benefits of Github. SDB 7954
May 14 2022