[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42242] Octave does not always execute most re
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory |
Date: |
Fri, 1 May 2020 12:49:24 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 |
Follow-up Comment #31, bug #42242 (project octave):
Could someone who is experiencing this problem try the following and report
the results here?
## Call your function.
my_fcn
## Get current Unix time.
time
## Get timestamp and other info about the file.
stat (file_in_loadpath ("my_fcn.m"))
## Edit the file and save changes.
## Get timestamp and other info about the modified file.
## Did editing the file change the mtime value? How does
## it compare to the Unix system time above?
stat (file_in_loadpath ("my_fcn.m"))
## Check to see whether the old version is still called
## or the modified version is loaded.
my_fcn
Long ago, when first thinking about how to reload functions when timestamps
changed, I thought to store the time when the function file was last parsed
and compare that with the mtime of the file. If the current mtime is newer
than the time it was last parsed, then Octave reloads the function. But it
occurs to me now that maybe we should just store the mtime of the file when we
read it and then when checking to reload, just compare that value to the
current mtime for the file and if the values are different, reload the file.
That way we don't rely on filesystem timestamps matching up with the system
time. We only care whether the file timestamps have changed. Is there any
reason that wouldn't work? Even if the timestamps go backward in time, then
we should probably read the file again as something might have changed (file
restored to some previous contents with a preserved timestamp, for example).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?42242>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory, Jon, 2020/05/01
- [Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory, Kai Torben Ohlhus, 2020/05/01
- [Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory, Jon, 2020/05/01
- [Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory,
John W. Eaton <=
- [Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory, Jon, 2020/05/01
- [Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory, John W. Eaton, 2020/05/01
- [Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory, Jon, 2020/05/01
- [Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory, John W. Eaton, 2020/05/01
- [Octave-bug-tracker] [bug #42242] Octave does not always execute most recently saved file in an NFS directory, Michael Godfrey, 2020/05/01