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: Fri, 13 Dec 2019 17:06:02 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

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

@Markus:
The directory that is lastly added to the path is always (if the default
"-begin" flag is used) the one-but-leftmost one, after ".", and should be
searched before all other directories (except ".").

Now, in your example:

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

has "B" and "C" added in reverse order (= contrary to at least my
expectation), because if addpath() would process its directory arguments from
left to right (as I would expect), it would first add "B" to the path, so the
path would first become .:B:A, then it would add C, so the final path would
become .:C:B:A.
But apparently addpath() adds the path arguments as one block, so that in the
end the rightmost directory in the argument list seems like it was added to
the path first.

If you look in 'DEFMETHOD addpath" in load-path.cc, you'll note that somewhere
around L.2567 the directory arguments are deliberately reversed (that is, to
me with my meager C++ proficiency it looks like that's what happens there).


    _______________________________________________________

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]