bugGNU Octave - Bugs: bug #46282, Newly defined functions within a...

 
 

bug #46282: Newly defined functions within a namespace are inaccessible via that namespace until restart of the octave session

Submitted by:  Tasos Papastylianou <tpapastylianou>
Submitted on:  Sat 24 Oct 2015 02:54:54 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Confirmed Assigned to:  None
Originator Name:  Tasos Papastylianou <poacheR> Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 21 Dec 2015 02:36:02 PM UTC, comment #3: 

I can confirm the bug here. The example must be run in a single Octave session and it must be run interactively, not pasted or run as a script.

If I combine the first two lines:

mkdir "./+Foo"; f = fopen("./+Foo/bar.m","wt");
fdisp (f, "function bar");
fdisp (f, "  disp('Hello from Foo.bar');");
fdisp (f, "endfunction");
fclose(f);
Foo.bar

it works. Maybe something to do with the way Octave detects +namespace directories appearing but not rescanning them if they are empty at the time?

Mike Miller <mtmiller>
Project Administrator
Sat 24 Oct 2015 06:08:39 PM UTC, comment #2: 

This also works for me
default branch and ubuntu 15.04

Doug Stewart <dastew>
Sat 24 Oct 2015 06:03:21 PM UTC, comment #1: 

Hi,

As explained in bug #46281, this example works for me on the default branch.

Pantxo Diribarne <pantxo>
Project Member
Sat 24 Oct 2015 02:54:54 PM UTC, original submission:  

Terminal session to reproduce bug:

>> mkdir "./+Foo";
>> f = fopen("./+Foo/bar.m","wt");
>> fdisp (f, "function bar");
>> fdisp (f, "  disp('Hello from Foo.bar');");
>> fdisp (f, "endfunction");
>> fclose(f);
>> Foo.bar
error: member `bar' in package `Foo' does not exist
>> exit
% restart octave session (in the same directory)
>> Foo.bar
Hello from Foo.bar

This bug links to "bug #46281: newly defined private functions are inaccessible until restart of octave session", likely representing the same issue under the hood, but listed here as a separate bug as per irc chat request (jwe).

Tasos Papastylianou <tpapastylianou>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by tpapastylianou (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-15 mtmiller Dependencies- => bugs #53907 is dependent
    2015-12-21 mtmiller StatusWorks For Me => Confirmed
    2015-10-24 pantxo StatusNone => Works For Me

    Back to the top


    Powered by Savane 3.5