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

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

[Octave-bug-tracker] [bug #64401] load-path promise 'removing from path'


From: Rik
Subject: [Octave-bug-tracker] [bug #64401] load-path promise 'removing from path' not kept
Date: Wed, 12 Jul 2023 12:58:14 -0400 (EDT)

Update of bug #64401 (project octave):

                  Status:         Patch Submitted => Patch Reviewed         

    _______________________________________________________

Follow-up Comment #5:

I verified that Markus's patch works for the issue at hand.

Unfortunately, the code is not clear to me.  The existing function is


void
load_path::update ()
{
  // I don't see a better way to do this because we need to
  // preserve the correct directory ordering for new files that
  // have appeared.

  signal_clear_fcn_cache ();

  m_top_level_package.clear ();

  m_package_map.clear ();

  for (auto& di : m_dir_info_list)
    {
      bool ok = di.update ();

      if (! ok)
        warning_with_id
        ("Octave:load-path:update-failed",
         "load-path: update failed for '%s', removing from path",
         di.dir_name.c_str ());
      else
        add (di, true, "", true);
    }
}


This appears as if it would automatically exclude a path that doesn't exist
from future consideration.  But, the load-path class contains two member
variables "m_dir_info_list" and "m_dir_list".  I can see that they are of
different types "std::list<dir_info>" and "std::list<std::string>", but
otherwise I'm not sure how they are used.  I've added jwe to the CC list for a
comment.

Otherwise, I think the patch can be committed.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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