bugGNU Octave - Bugs: bug #48845, missing warning when a newly...

 
 

bug #48845: missing warning when a newly created function file shadows a built-in function

Submitter:  Jeff Rickard <captainnormal>
Submitted:  Mon 22 Aug 2016 05:58:42 AM UTC
   
 
Category:  Interpreter Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 22 Aug 2016 05:07:35 PM UTC, comment #2: 

Confirmed, actually this was raised on the mailing list recently

http://lists.gnu.org/archive/html/help-octave/2016-08/msg00127.html

So I can confirm that the appropriate warning does appear when a directory is added to the load path, when the working directory is changed, or when Octave first starts, but it does not appear when a new function file appears in the current load path.

Mike Miller <mtmiller>
Group Member
Mon 22 Aug 2016 07:59:35 AM UTC, comment #1: 

Just pointing out this relates to a question on StackOverflow: stackoverflow.com/questions/39059086/octave-not-recognizing-installed-packages/39062311

I encouraged Jeff to file a bug, but for me the main issue was that this caused pkg to break.

Overloading load.m is a silly bug, but a bug nonetheless; the pkg command is central to octave and should have been immune to even such a silly scenario.

Tasos Papastylianou <tpapastylianou>
Mon 22 Aug 2016 05:58:42 AM UTC, original submission:  

When a new function is defined which shadows a built-in function there is no warning.

In my case this was a new installation and `pkg list` showed `no packages installed` the first time I used it, as in the meantime I had shadowed the `load` function. After much lost time with reinstallation, clearing registry entries, etc, I first discovered when a warning was issued when changing directory to the one where shadowing `load.m` was stored. It would have been a significant help if the same warning had been issued when the function was first shadowed (eg when using `File / New / New Function...` or adding a function to the current directory with an external editor or file explorer).

Jeff Rickard <captainnormal>

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by tpapastylianou (Posted a comment)
  • -email is unavailable- added by captainnormal (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-22 mtmiller Severity3 - Normal 2 - Minor
        StatusNone Confirmed
        Release4.0.3 dev
        Operating SystemMicrosoft Windows Any
        SummaryNo warning when shadowing a built-in function with a new function missing warning when a newly created function file shadows a built-in function

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code