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

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

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 28 Jan 2022 09:00:41 AM UTC, comment #6: 
Kai Torben Ohlhus <siko1056>
Group Member
Wed 26 Jan 2022 02:57:26 AM UTC, comment #5: 

Patch submitted in bug #54636.

Kai Torben Ohlhus <siko1056>
Group Member
Mon 24 Jan 2022 09:45:42 AM UTC, comment #4: 

Running


path(path)


is a workaround for the original problem.

Kai Torben Ohlhus <siko1056>
Group Member
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>
Group Member
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>
Group 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

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by svillemot
  • -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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-28 siko1056 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2022-01-26 siko1056 Dependencies- Depends on bugs #54636
    2021-09-23 svillemot Carbon-Copy- Added svillemot
    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.13-f8d8.
    Corresponding source code