bugGNU Octave - Bugs: bug #48235, ver.m does not output an empty...

 
 

bug #48235: ver.m does not output an empty struct for an unknown package

Submitted by:  Garrett Euler <ggeuler>
Submitted on:  Wed 15 Jun 2016 06:05:06 PM UTC  
 
Category: Octave FunctionSeverity: 2 - Minor
Priority: 3 - LowItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.2Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 16 Jun 2016 04:04:32 PM UTC, comment #5:

Okay, thanks for testing. Octave is compatible in returning a row vector struct array.

Rik <rik5>
Project Administrator
Thu 16 Jun 2016 03:43:17 PM UTC, comment #4:

All versions of Matlab I have available (2009-2014) give a 0x0 for an unknown toolbox. In Matlab (2014a):

Octave with the patch is giving exactly the same.

Returning all toolbox info using ver in Matlab:

Garrett Euler <ggeuler>
Thu 16 Jun 2016 04:41:23 AM UTC, comment #3:

Small side question, does Matlab return a column or row vector struct for ver? Octave is returning a row vector, but Matlab usually likes column vectors.

Rik <rik5>
Project Administrator
Thu 16 Jun 2016 12:37:23 AM UTC, comment #2:

@Garrett: Thanks for the patch. I modified the commit message slightly. We like to have the bug number in the commit message which makes it easy to grep through the Mercurial logs to find which particular changeset solved an issue. At any rate, I checked it in on the stable branch here http://hg.savannah.gnu.org/hgweb/octave/rev/2c035963f469. It will be a part of the next bug fix release, 4.0.3.

Rik <rik5>
Project Administrator
Wed 15 Jun 2016 06:31:29 PM UTC, comment #1:

I can confirm the difference in behavior between 3.8 and 4.0 (and still the same change in behavior on the default branch).

I didn't even know ver was used for this, but yes if this is a Matlab compatibility issue, this should probably be fixed on the stable branch.

It looks like this change is where the behavior was changed: http://hg.savannah.gnu.org/hgweb/octave/rev/b54093acb8fe

Mike Miller <mtmiller>
Project Administrator
Wed 15 Jun 2016 06:05:06 PM UTC, original submission:

In Octave 3.8.2- calling ver.m on an unknown package produced an empty struct - which is what ver.m does in Matlab too. Octave stable (4.0.2) & dev now produce a scalar struct with empty fields which is not compatible with previous Octave and Matlab.

As an example, this makes testing for a missing package go from:
to:

I have attached a small patch to fix the issue (affects a single command within ver.m and adds a test).

Garrett Euler <ggeuler>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #37492:  octave4_ver.diff added by ggeuler (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by ggeuler (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 16 Jun 2016 12:37:23 AM UTCrik5Open/ClosedOpen=>Closed
    Thu 16 Jun 2016 12:37:22 AM UTCrik5StatusConfirmed=>Fixed
    Wed 15 Jun 2016 06:31:29 PM UTCmtmillerSeverity3 - Normal=>2 - Minor
      Priority5 - Normal=>3 - Low
      StatusNone=>Confirmed
    Wed 15 Jun 2016 06:05:06 PM UTCggeulerAttached File-=>Added octave4_ver.diff, #37492

    Back to the top


    Powered by Savane 3.1-cleanup1