Small or big dub packages

Guillaume Piolat spam at smam.org
Thu Nov 1 14:07:37 UTC 2018


On Monday, 29 October 2018 at 11:31:55 UTC, Igor wrote:
> The way I see it the advantage of smaller packages is that 
> users can pick and choose and and only have the code they 
> really need in their project, but the con could become managing 
> a lot of dependencies. Also I am not sure how compile time on 
> clean project and previously compiled project would be affected.

Pros:
   Users can pick exactly what they need.
   Encourages decoupling instead of too much cohesion.
   Less code to build and maintain.
   Less chances of breakage on upgrade since you depend on less.
   Improve build time since only modified sub-packages get rebuilt.
   Good for the ecosystem.

Cons:
   More link-time operations when not using --combined, each 
sub-package is compiled at once. Too much sub-package can slow 
down builds.
   Possibly hitting more DUB edge cases (less the case since DUB 
has tests)
   Directory layout may need to change for proper VisualD support.
   On the DUB registry, sub-packages are less popular than "big" 
packages because less discoverable and for some reasons some 
people won't just pick a sub-package when there is a toplevel 
package.


More information about the Digitalmars-d-learn mailing list