[Metacello] about required list
Hi using the dependency analyser I see that may packages have the following dependencies for example package: 'Math-DistributionGamma' with: [ spec requires: #('Math-Core' 'Math-DHB-Numerical' 'Math-Series' 'Math-Core-Distribution') ]; package: 'Math-DistributionBeta' with: [ spec requires: #('Math-DistributionGamma' 'Math-Core' 'Math-Core-Distribution' 'Math-DHB-Numerical' 'Math-Series') ]; so I wrote the requirement this way Now does it have an impact on Metacello and should I keep only the direct depend. package: 'Math-DistributionBeta' with: [ spec requires: #('Math-DistributionGamma' ) ]; This is annoying because I have 50 packages and doing that manually is a pain. Stef
On 26/03/2016 22:00, stepharo wrote:
Hi
using the dependency analyser I see that may packages have the following dependencies
for example
package: 'Math-DistributionGamma' with: [ spec requires: #('Math-Core' 'Math-DHB-Numerical' 'Math-Series' 'Math-Core-Distribution') ];
package: 'Math-DistributionBeta' with: [ spec requires: #('Math-DistributionGamma' 'Math-Core' 'Math-Core-Distribution' 'Math-DHB-Numerical' 'Math-Series') ];
so I wrote the requirement this way
Now does it have an impact on Metacello and should I keep only the direct depend.
Hi, Since Math-DistributionBeta depend on Math-DistributionGamma you can do: package: 'Math-DistributionGamma' with: [ spec requires: #('Math-Core' 'Math-DHB-Numerical' 'Math-Series' 'Math-Core-Distribution') ]; package: 'Math-DistributionBeta' with: [ spec requires: #('Math-DistributionGamma') ]; You can do this if beta really cannot work without gamma and if gamma will keep the same dependencies. And it is important I think because imagine Math-DisctirbutionBeta depend on Ston. You can create a group gamma and a group beta. If you load the group gamma, you will not get the ston dependency because it only concern gamma.
package: 'Math-DistributionBeta' with: [ spec requires: #('Math-DistributionGamma' ) ];
This is annoying because I have 50 packages and doing that manually is a pain.
Stef
-- Cyril Ferlicot http://www.synectique.eu 165 Avenue Bretagne Lille 59000 France
Stef, You don't need to repeat packages in the requires statement. Requiring 'Math-DistributionGamma' is sufficient to pick up 'Math-Core', 'Math-DHB-Numerical', 'Math-Series', and 'Math-Core-Distribution' as requirements as well ... . Dale On 03/26/2016 02:00 PM, stepharo wrote:
Hi
using the dependency analyser I see that may packages have the following dependencies
for example
package: 'Math-DistributionGamma' with: [ spec requires: #('Math-Core' 'Math-DHB-Numerical' 'Math-Series' 'Math-Core-Distribution') ];
package: 'Math-DistributionBeta' with: [ spec requires: #('Math-DistributionGamma' 'Math-Core' 'Math-Core-Distribution' 'Math-DHB-Numerical' 'Math-Series') ];
so I wrote the requirement this way
Now does it have an impact on Metacello and should I keep only the direct depend.
package: 'Math-DistributionBeta' with: [ spec requires: #('Math-DistributionGamma' ) ];
This is annoying because I have 50 packages and doing that manually is a pain.
Stef
Le 28 mars 2016 à 22:36, Dale Henrichs <dale.henrichs@gemtalksystems.com> a écrit :
Stef,
You don't need to repeat packages in the requires statement. Requiring 'Math-DistributionGamma' is sufficient to pick up 'Math-Core', 'Math-DHB-Numerical', 'Math-Series', and 'Math-Core-Distribution' as requirements as well ⦠.
Indeed but it is a bad practice. If 'Math-DistributionBetaâ has direct dependencies to 'Math-Core', 'Math-DHB-Numerical', 'Math-Series', and 'Math-Core-Distributionâ, they should be expressed. Else, you will end up with a configuration with missing requirements. ex: if I update 'Math-DistributionGammaâ and do no depend anymore on 'Math-Seriesâ for example. I will remove 'Math-Seriesâ from 'Math-DistributionGammaâ requirements. Then, I end with a missing dependency for 'Math-DistributionBetaâ. What you could do is to define a group with 'Math-Core', 'Math-DHB-Numerical', 'Math-Series', and 'Math-Core-Distributionâ if it makes senses for your business logic. Then, both 'Math-DistributionGammaâ and 'Math-DistributionBetaâ could add this group as requirement. Note that factorization of dependencies is not always a good idea. If dependencies you want to factorize have nothing to do all together, itâs better to avoid to group them because they will change many times. Christophe
participants (4)
-
Christophe Demarey -
Cyril Ferlicot Delbecque -
Dale Henrichs -
stepharo