bugGNU Octave - Bugs: bug #57814, [octave forge] (NaN) "shadows...

 
 

bug #57814: [octave forge] (NaN) "shadows core function" warnings when loading package

Submitted by:  Andrew Janke <apjanke>
Submitted on:  Sat 15 Feb 2020 03:02:31 AM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  5.2.0 Operating System:  Mac OS

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Sat 15 Feb 2020 08:44:52 PM UTC, comment #3: 

I see, I can reopen, but I'm not sure this is solvable.

Part of the expectation of PKG_ADD is that the directory has already been added to the load path when the content runs. So by the time PKG_ADD would be able to do something, the warnings have already been issued.

I think this would require some new marker in the directory that Octave's load-path functions would handle internally, for example a .nowarn file or something. And I'm not sure that's something we'd want to handle in Octave.

Mike Miller <mtmiller>
Project Administrator
Sat 15 Feb 2020 08:38:26 PM UTC, comment #2: 

Sorry, the rest of my post got lost due to an unclosed "verbatim" tag.

What I mean is, yeah, I agree that this is intended behavior. And since it's working as intended, perhaps the warnings should be suppressed? They don't indicate anything going wrong, and no user action is required, so IMHO they shouldn't be displayed to the user.

This is what I see:

octave:2> pkg load nan
warning: function /Users/janke/octave/nan-3.4.5/mad.m shadows a core library function
warning: called from
    load_packages_and_dependencies at line 48 column 5
    load_packages at line 47 column 3
    pkg at line 461 column 7
warning: function /Users/janke/octave/nan-3.4.5/prctile.m shadows a core library function
warning: called from
    load_packages_and_dependencies at line 48 column 5
    load_packages at line 47 column 3
    pkg at line 461 column 7

and when I see something like that, I assume something's going wrong that I need to address.

Maybe a little magic in PKG_ADD could be used to temporarily disable the "shadows core function" warning while the nan package is adding its stuff to the path?

Andrew Janke <apjanke>
Sat 15 Feb 2020 08:35:11 PM UTC, comment #1: 

I think that is the expected behavior of the NaN package. The intent is to provide replacements of core functions that have different behavior under the presence of NaN values.

Mike Miller <mtmiller>
Project Administrator
Sat 15 Feb 2020 03:02:31 AM UTC, original submission:  

When I load the nan Octave Forge package, I get several warnings about it shadowing core library functions.

Andrew Janke <apjanke>

 

(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 apjanke (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-15 mtmiller StatusInvalid => Confirmed
        Open/ClosedClosed => Open
        Summary"shadows core function" warnings when loading nan package => [octave forge] (NaN) "shadows core function" warnings when loading package
    2020-02-15 mtmiller StatusNone => Invalid
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.5