Le 25/10/2024 à 13:23, Gilles Sadowski a écrit :

The recent flip-flopping changes in [CLI] and [Configuration]
made me wonder if I should, again, try to raise the question
of when and how Commons components should depend on
other Commons components. >
Previous attempts (hinting at "when" and "how") have been
ignored, but shouldn't we at least have a consensus, backed
with a few hard rules?

It's difficult to set clear rules on this, there is a trade-off between the service brought by a dependency and the cost of adding it, and every situation has to be evaluated carefully.

For example removing the dependency on commons-lang from commons-compress was really a no brainer, adding a 600KB dependency just to save 10 lines initializing an array with non zero values is definitely not worth it. But for another component such as commons-configuration, commons-lang provides many useful features and it would be difficult to do without it.

At least for the low level components (lang, io, codec, collections) non optional runtime dependencies should be avoided. For the other components, we should refrain from adding dependencies if a not overly complex JDK equivalent exists. And there is also the possibility of shading a few classes or methods from another component at build time to avoid pulling the full dependency at runtime.

Emmanuel Bourg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to