[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no
From: |
Tasos Papastylianou |
Subject: |
[Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect |
Date: |
Sat, 1 May 2021 12:29:21 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0 |
URL:
<https://savannah.gnu.org/bugs/?60493>
Summary: ignore_function_time_stamp none has no effect
Project: GNU Octave
Submitted by: tpapastylianou
Submitted on: Sat 01 May 2021 04:29:18 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name: Tasos Papastylianou
Originator Email:
Open/Closed: Open
Release: 6.2.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
According to the octave manual[0] the command
ignore_function_time_stamp none
will cause octave to "always check time stamps on files to determine whether
functions defined in function files need to recompiled".
The intent of this command, as I understand it, is to always check files for
modifications, allowing one to modify a function file and use the updated
definition within an ongoing session, without having to restart the session,
and without having to run "clear functions" first.
However, the command seems to have no effect in practice.
Example (adapted from [1]):
ignore_function_time_stamp none
fA = fopen( 'A.m', 'w' ); fprintf( fA, "function A()\n disp( 'Hello from A'
)\n B()\nend\n" ); fclose( fA );
mkdir private
fB = fopen( 'private/B.m', 'w' ); fprintf( fB, "function B()\n disp( 'Hello
from B' )\n%% C()\nend\n" ); fclose( fB );
fC = fopen( 'C.m', 'w' ); fprintf( fC, "function C()\n disp( 'Hello from C'
)\nend\n" ); fclose( fC );
fprintf( "-- before activating C within B --\n" )
A()
fprintf( "-- after editing B and activating C within it --\n" )
fB = fopen( 'private/B.m', 'w' ); fprintf( fB, "function B()\n disp( 'Hello
from B' )\n C()\nend\n" ); fclose( fB );
A()
fprintf( "-- after clearing manually --\n" )
clear functions
A()
When the above is run as a script, the second step doesn't show the call to
C(), even though that instruction is now 'active' (i.e. uncommented) in the
file. Futhermore, if the modifications aren't made via 'fopen', but manually
in an editor, this results in an explicit error, as detailed in [1].
If my understanding is correct, the role of 'ignore_function_time_stamp none'
is to explicitly always check if a function file has been modified and fetch
the updated definition before running it, so the above behaviour is not the
intended behaviour. (I have no problem with this behaviour from an
optimisation point of view, but based on the documentation of that command,
this is a bug).
[0]
https://octave.org/doc/v6.2.0/Function-Files.html#index-ignore_005ffunction_005ftime_005fstamp
[1]
https://stackoverflow.com/questions/67334895/access-private-functions-from-private-functions-in-octave-bug
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60493>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect,
Tasos Papastylianou <=
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, Mike Miller, 2021/05/01
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, Tasos Papastylianou, 2021/05/01
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, Mike Miller, 2021/05/01
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, Rik, 2021/05/02
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, Rik, 2021/05/02
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, anonymous, 2021/05/07
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, Mike Miller, 2021/05/07
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, Mike Miller, 2021/05/07
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, Rik, 2021/05/07
- [Octave-bug-tracker] [bug #60493] ignore_function_time_stamp none has no effect, anonymous, 2021/05/07