bugGNU Octave - Bugs: bug #46437, Inform users to load package...

 
 

bug #46437: Inform users to load package installed via a standard message

Submitter:  None
Submitted:  Fri 13 Nov 2015 05:58:29 PM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Need Info Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 08 Jun 2019 03:21:02 AM UTC, comment #5: 

It seems that Octave already emits a warning when users try to use a function that they have available in a package, but which has not yet been loaded.  Closing report.

Rik <rik5>
Group administrator
Mon 16 Nov 2015 06:42:08 PM UTC, comment #4: 

@Carnë:

First, I didn't think specifically of the io package, nor do I have a problem here :-)

Then:
Unimplemented hasn't been written by me. Looking at the io-related stanza for the first time, I wonder why check_message isn't called in the first place for the io package?

If the motive is that core Matlab equivalent functions living in Octave-Forge packages deserve separate messages I'd disagree; Matlab compatibility for me merely means Matlab code should be working in Octave yielding identical results, not Octave being an exact and /gratis/ clone of Matlab incl. all function locations and all GUI bells and whistles (not mentioning bugs and inconsistencies).
Users expecting otherwise should be enlightened by consistent nudges, as per my comment #2.

So, if I were to "improve that message" I would simply replace it by a calling 'check_pkg (fcn, "io")', analogously as for the other packages.

BTW I read Mike's suggestion in bug #45855 as some support for my POV, although he words it very neutral :-)

Philip Nienhuis <philipnienhuis>
Group Member
Sun 15 Nov 2015 05:22:53 PM UTC, comment #3: 

Bug #45855 is related to this, this is probably even a duplicate.

Octave does warn users to load packages via a standard message. And it doesn't need to have a package installed. If the package is not installed it warns to install, and if it is installed, it warns to load the package:


octave:1> pkg uninstall financial
octave:2> today()
warning: the 'today' function belongs to the financial package from Octave Forge
which seems to not be installed in your system.

Please read <http://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
warning: called from
    __unimplemented__ at line 524 column 5
error: 'today' undefined near line 1 column 1
octave:2> pkg install -forge financial
[ silence syntax deprecation warnings ]
For information about changes from previous versions of the financial package, run 'news financial'.
octave:3> today ()
warning: the 'today' function belongs to the financial package from Octave Forge
which you have installed but not loaded.  To load the package, run 'pkg
load financial' from the Octave prompt.

Please read <http://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
warning: called from
    __unimplemented__ at line 524 column 5
error: 'today' undefined near line 1 column 1
octave:3> pkg load financial
octave:4> today ()
ans =  736283


Philip, your problem is specific to the io package because its functions do not match a Matlab toolbox (by the way, ML is a different programming language and does not stand for Matlab).  Octave has a specific message for the functions xlsread and xlswrite. See _unimplemented_.m

http://hg.savannah.gnu.org/hgweb/octave/file/571508c1ed06/scripts/help/__unimplemented__.m#l98

So maybe you want to improve that message?

Carnë Draug <carandraug>
Group Member
Sat 14 Nov 2015 12:25:04 PM UTC, comment #2: 

Why not do both?
From the repeated questions on this in the help ML I sometimes think novice Octave users (= the ones hitting this basic issue) can't have enough nudges.

The original suggestion could also have a check for the (pkg install..) "-auto" flag, so there's a little more to it there.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 13 Nov 2015 06:30:30 PM UTC, comment #1: 

This can be done easily, but will be of limited usefulness. The message only appears when the package is first installed, so the next time Octave starts the user might forget that the package needs to be loaded again.

Maybe more useful would be to add logic to the _unimplemented_ function so it says, for example:


warning: Functions for spreadsheet style I/O (.xls .xlsx .sxc .ods .dbf .wk1
etc.)  are provided in the io package, which is installed but not loaded.
To load the package, run 'pkg load io' from the Octave prompt.


so the user sees the message every time the function is called.

Mike Miller <mtmiller>
Group Member
Fri 13 Nov 2015 05:58:29 PM UTC, original submission:  

As packages are no longer autoloaded by pkg install, it may be helpful to inform users to load them before use via a message like "To use the <package>, run 'pkg load <package>'".

It can be appended the standard message "For information about changes from previous versions of the <package> package, run 'news <package>'." that is shown after pkg install is completed.

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 rik5 (Posted a comment)
  •  

    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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-06-08 mtmiller Carbon-CopyRemoved 80942 -
    2019-06-08 rik5 Open/ClosedOpen Closed
    2017-08-14 mtmiller CategoryOctave Package Octave Function
        Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
    2015-11-13 mtmiller StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code