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: Markus Mützel
Subject: [Octave-bug-tracker] [bug #57403] pkg.m loads packages before their dependencies
Date: Sat, 14 Dec 2019 08:35:14 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

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

The question was meant to be rhetorical. The implied answer being: There is no
reason whatsoever to reverse the order of precedence of the supplied folders
(with respect to each other) depending on whether the paths are added to the
front or the end.
So what addpath does currently is correct imho.

With respect to the second part, addpath does the following:

>> cur_path = path
cur_path = .:A
>> addpath ("B", "C", "-end");
>> cur_path = path
cur_path = .:A:B:C


If it were adding the paths from right to left, the result would be
different:

>> cur_path = path
cur_path = .:A
>> addpath ("C", "-end");
>> cur_path = path
cur_path = .:A:C
>> addpath ("B", "-end");
>> cur_path = path
cur_path = .:A:C:B


So the whole reverse order or right-to-left thing doesn't describe addpath's
behavior correctly.

If you think that it makes the current behavior clearer, we could maybe add
something like:
"The newly added paths appear in the load path in the same order that they
appear in the arguments of addpath."

    _______________________________________________________

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]