bugGNU Octave - Bugs: bug #44856, impossible to nest one package...

 
 

bug #44856: impossible to nest one package inside another

Submitter:  sergey plotnikov <nul0m>
Submitted:  Thu 16 Apr 2015 02:37:42 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  goffioul
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 02 Jun 2015 04:46:54 PM UTC, comment #8: 

Retagging release from 4.0.0-rc3 to 4.0.0.

John W. Eaton <jwe>
Group administrator
Sun 19 Apr 2015 11:33:36 PM UTC, comment #7: 
Michael Goffioul <goffioul>
Sun 19 Apr 2015 10:18:30 PM UTC, comment #6: 

The attached patch should solve the problem. Although the combined solution for bugs #43769 and this one doesn't really look very efficient.


(file #33724)

Michael Goffioul <goffioul>
Sun 19 Apr 2015 10:05:36 PM UTC, comment #5: 

Ok, thanks, I missed the earlier commit that broke package namespaces. You are exactly right, before cset 8fe29850fb74, the following works:


octave:2> foo.fun1
fun1 called
octave:3> foo.bar.fun2
fun2 called


After that cset, both fail to find the respective functions, and after 8b501a0db1e9 is as today, a package within another package doesn't work.

Mike Miller <mtmiller>
Group Member
Sun 19 Apr 2015 08:32:00 PM UTC, comment #4: 

There was a first attempt to solve the bug with the cset http://hg.savannah.gnu.org/hgweb/octave/rev/8fe29850fb74 which was reverted with cset http://hg.savannah.gnu.org/hgweb/octave/rev/8b501a0db1e9. You should try before those 2 changes were made.

Michael Goffioul <goffioul>
Sun 19 Apr 2015 07:36:31 PM UTC, comment #3: 

Well, it appears to have been broken already before that fix was made. With cset 10600b2dd3c1, which preceded the fix, I get:


octave:1> ls +foo
+bar  fun1.m
octave:2> foo.fun1
error: 'foo' undefined near line 1 column 1


Updating to the fix cset 8b501a0db1e9, I get


octave:1> foo.fun1
fun1 called
octave:2> foo.bar.fun2
error: member `bar' in package `foo' does not exist


Mike Miller <mtmiller>
Group Member
Sun 19 Apr 2015 06:56:32 PM UTC, comment #2: 

I've a feeling this might be related to the fix for bug #43769.

Michael Goffioul <goffioul>
Sat 18 Apr 2015 07:44:15 PM UTC, comment #1: 

Thanks for your bug report. I can confirm this with the current default branch, and that it used to work with changeset 932aca9a7c57, which looks to me like where the feature was first added.

Mike Miller <mtmiller>
Group Member
Thu 16 Apr 2015 02:37:42 PM UTC, original submission:  

For some reason I'm not able to call a script from the package folder nested inside another package (i.e. +pkg1/+pkg2/myfun.m). It used to work in previous compilations of default branch.

Here is the example:

>> pkg1.s1
s1 was called
>> pkg1.pkg2.s2
error: member `pkg2' in package `pkg1' does not exist


content of +pkg1/s1.m:

disp('s1 was called');


content of +pkg1/+pkg2/s2.m:

disp('s2 was called');


sergey plotnikov <nul0m>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33724:  bug44856.diff added by goffioul (831B - text/x-patch - Patch to solve issue)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by nul0m (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-02 jwe Release4.0.0-rc3 4.0.0
    2015-04-19 goffioul Assigned toNone goffioul
        Open/ClosedOpen Closed
    2015-04-19 goffioul Attached File- Added bug44856.diff, #33724
    2015-04-18 mtmiller CategoryNone Interpreter
        Item GroupNone Incorrect Result
        StatusNone Confirmed
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code