bugGNU Octave - Bugs: bug #46889, conflict between function and...

 
 

bug #46889: conflict between function and +package with same name

Submitter:  None
Submitted:  Wed 13 Jan 2016 11:13:50 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Quentin Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 17 Jan 2018 04:55:42 PM UTC, comment #4: 

I stumbled upon the same problem today while porting some matlab code to octave.

Another clue for resolving the issue might be that if one has a folder '+exp/' with 'somefile.m' inside, then 'exp.somefile' seems to work and exp(1) errors.

In matlab both commands do not error and behave as expected.

Anonymous
Sun 03 Sep 2017 12:38:41 AM UTC, comment #3: 

Confirmed.  I created a '+plot/' directory and then a file 'myplot.m' inside that directory.


plot (1:10);  # works
plot.myplot   # fails
plot.myplot ()
error: Invalid call to plot.  Correct usage is:



Rik <rik5>
Group administrator
Fri 15 Jan 2016 03:55:06 PM UTC, comment #2: 

In matlab I can do this even when a +load file is present:

> load file.mat


In octave, I get:
 

> error: invalid meta.package indexing


Here is another example:

I have some function "myplot.m" in a folder named +plot.

In matlab I can do:

> plot(x,y)
> plot.myplot


and both work.

In octave the second line returns:

> error: Invalid call to plot.  Correct usage is:
> ...


Quentin <impact27>
Thu 14 Jan 2016 05:08:09 PM UTC, comment #1: 

Confirmed, but is this just normal namespace shadowing?

What does Matlab do?


>> x = pi;
>> save vars.mat
>> clear all
>> mkdir +load
>> load vars.mat


Mike Miller <mtmiller>
Group Member
Wed 13 Jan 2016 11:13:50 AM UTC, original submission:  

If octave is launched from a folder containing a folder named '+load', the pkg command will not work.

(Terminal):

>mkdir +load
>octave


(Octave):
octave:1> pkg list
no packages installed.

Anonymous

 

(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

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by svillemot
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by impact27 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-09-14 svillemot Carbon-Copy- Added svillemot
    2018-08-15 rik5 Release4.0.0 dev
    2017-09-03 rik5 StatusNeed Info Confirmed
    2017-08-13 jwe CategoryOctave Package Interpreter
        Severity2 - Minor 3 - Normal
        Summarypkg can't find package if a folder named +load is present conflict between function and +package with same name
    2016-01-14 mtmiller Severity3 - Normal 2 - Minor
        StatusNone Need Info
        Operating SystemMac OS Any

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code