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

Submitted by:  Jeff Rickard <captainnormal>
Submitted on:  Mon 22 Aug 2016 05:58:42 AM UTC  
 
Category: InterpreterSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Feature Request
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project Administrator
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by tpapastylianou (Posted a comment)
  • -unavailable- added by captainnormal (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 22 Aug 2016 05:07:35 PM UTCmtmillerSeverity3 - 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.1-cleanup1