octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pkg.m] Load order of dependencies


From: Andrew Janke
Subject: Re: [pkg.m] Load order of dependencies
Date: Mon, 9 Dec 2019 15:45:18 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1


On 12/9/19 3:39 PM, PhilipNienhuis wrote:> JuanPi wrote
>> Hi all,
>>
>> Is there any reason to make pkg.m load first the package and then the
>> dependencies?
>
> I had more or less similar questions about pkg.m, motivated by matgeom /
> geometry as well, but some years ago also by rad2deg & deg2rad that
happened
> to live in two different OF packages and later on in core Octave as well.
>
> The logic is in scripts/pkg/private/load_packages_and_dependencies.m
> As far as I could follow that code there is no need for a specific
order of
> loading of packages. AFAICS the order in which package and dependency
> directories are added to the path is just a corollary of the way the code
> happened to be written.
> But I can be wrong ....
>
> Lately I did some work on pkg.m so I got some feeling for how it sticks
> together. I'll look into this but only later this week or next weekend.
>
> Philip

I would think that the dependencies of package A should be loaded before
A, because A's startup/teardown code (in PKG_ADD or PKG_DEL) might use
functions/classes provided by its dependencies?

Also, anybody who cares about this, come on by Packajoozle and give
suggestions if you want. https://github.com/apjanke/octave-packajoozle
Packajoozle loads its packages in dependency order (dependents before
dependers) for this reason.

Cheers,
Andrew




reply via email to

[Prev in Thread] Current Thread [Next in Thread]