[Top][All Lists]

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

[Octave-bug-tracker] [bug #40319] deleting script file in a function/scr

From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #40319] deleting script file in a function/script doesn't update the symbol table
Date: Fri, 14 Feb 2014 13:44:10 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:26.0) Gecko/20100101 Firefox/26.0

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

Sorry for the late reply. I agree with you that there are many ways to make a
function file disappear and we should not try to manage all of them

The reason why the example works in the terminal and not in a script, is that
the path is updated before parsing each input from the prompt (in
octave_base_reader::octave_gets from input.cc).

For exist and which functions it seems reasonable to update the path before
anything is done.

As it is not reasonable to update the path after each line of a
script/function, a test is run (out_of_date_check) from various
symbol_table::fcn_info::fcn_info_rep::find_xx functions. 

Unfortunatly, the test only checks that the last time the function file was
checked is ulterior to last prompt and last dir change. 

As a consequence, not only deleted files, but also modified are affected :
let's say I have a script toto.m that modifies a second script toto2.m and
then runs it. The old version of toto2.m will be run because according to the
criteria in out_of_date_check, it is up to date and doesn't even have to be
parsed again.
The test should also check that the last time the file was modified is
anterior to both last prompt and last dir change. Not sure this may be done
fast enough (with stat?). 



Reply to this item at:


  Message posté via/par Savannah

reply via email to

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