octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #57403] pkg.m loads packages before their depe


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #57403] pkg.m loads packages before their dependencies
Date: Sat, 14 Dec 2019 09:56:38 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #7, bug #57403 (project octave):

As to addpath:
=============
OK, with the '-end' flag the load order is from left to right. I just tried
with the example packages in share/octave/6.0.0/etc/tests/fixed/pkg (after
adding a PKG_ADD with a message):

>> addpath ("mfile_basic_test", "mfile_minimal_test", '-begin')
This is mfile_minimal
This is mfile_basic
>> rmpath ("mfile_basic_test", "mfile_minimal_test")
>> addpath ("mfile_basic_test", "mfile_minimal_test", '-end')
This is mfile_basic
This is mfile_minimal


The sentence you suggest indeed covers both cases; but the implications for
load order and shadowing remain hidden. My intention was to add a little
warning or make users more aware. How about this:
"The newly added paths appear in the load path in the same order that they
appear in the arguments of addpath. To this end the paths are actually loaded
in that order when added to the end of the path but in reverse order when
added to the front of the path."

As to pkg.m (the actual bug in this report):
===========
Should other core devs be cc'd?
AFAICS no packages I have in my mxe builds rely on any other one for
initialization or shadowing, so I think the proposed patch is safe and
backwards-compatible.
I hope it will be applied (to stable as well) - it'll easily solve JuanPi's
geometry/matgeom package issue and AFAICS the fix is the right thing to do.
But maybe the core devs know better.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57403>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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