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: PhilipNienhuis
Subject: Re: [pkg.m] Load order of dependencies
Date: Fri, 13 Dec 2019 05:21:33 -0600 (CST)

PhilipNienhuis wrote
> JuanPi wrote
>> Hi all,
>> 
>> Is there any reason to make pkg.m load first the package and then the
>> dependencies?
>> 
>> Taking the development version of geometry as an example:
>> 
>>> pkg load geometry
>> GEOMETRY
>> matgeom loaded 0
>> MATGEOM
>> geometry loaded 1
>> 
>> For me it would make only sense that at the time the package folder is
>> added to the path the dependencies are already loaded.
> 
> I looked a little more into it and found something I didn't know or
> realize:
> 
>>> addpath ("a", "b")
>>> path
> Octave's search path contains the following directories:
> 
> .
> "a"
> "b"
> :
> <rest of path>
> so addpath() loads packages in its argument list from right to left; IMO
> contrary to at least my expectations. Anyway this isn't documented in
> "help
> addpath".

The more I think about it, the more I'm getting convinced that it is
addpath's counter-intuitive behavior that is the culprit here.

I've filed a bug report + patch for pkg.m to fix the load order of packages
and dependencies and also supplied a doc fix for addpath(). (bug #57403).

Philip




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html



reply via email to

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