bugGNU Octave - Bugs: bug #50294, version('-release') has no result

 
 

bug #50294: version('-release') has no result

Submitter:  Georg Wiora <gwiora>
Submitted:  Mon 13 Feb 2017 02:53:44 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  gwiora Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Feb 2017 12:10:36 AM UTC, comment #3: 

I made a change on the stable branch to document that -release always returns an empty string, just like -description:

https://hg.savannah.gnu.org/hgweb/octave/rev/41a01755a7b9

If there are compelling reasons for raising an error or a warning in this case, that can be added separately, but I don't see that as a useful thing to do at the moment.

Mike Miller <mtmiller>
Group Member
Tue 14 Feb 2017 07:46:23 AM UTC, comment #2: 

Changing the documentation would basically be an acceptable solution for me.

I just wonder if it may be more suitable here to issue a warning or even an error message when using the '-release' option in Octave, because it does not produce the expected result any way and therefore needs a code adaption to make matlab code compatible to octave.

I suggest to issue the following warning text:

'Warning: using matlab version() function with "-release" option in octave returns an empty result. Please adapt your code to produce the expected result!'


Georg Wiora <gwiora>
Mon 13 Feb 2017 08:02:18 PM UTC, comment #1: 

In bug #45659, support was added for various options to the version command. It was decided and specifically implemented that -release returns an empty string. So the option is recognized for Matlab compatibility, but the result is an empty string so it does not match any Matlab release numbers.

We could explicitly mention in the help for version that -release returns an empty string for Octave, would that help address what you see as a problem?

Mike Miller <mtmiller>
Group Member
Mon 13 Feb 2017 02:53:44 PM UTC, original submission:  

Calling the following has no result in octave:

>> version('-release')

Documentation states it should return "the name of the running build".

In matlab the "-release" option causes version to return "release number for the MATLAB software currently running". This is what octave returns without argument. Example:

>> version
ans = 4.2.0


I guess it would not be a good idea to return the release number of  octave here because matlab code would not work as expected anyway. I suggest to give the return value written in the octave documentation. This could force matlab code normally into an error and therefore help to adapt it to a more protable behaviour.

Georg Wiora <gwiora>

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-15 mtmiller StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2017-02-13 rik5 Carbon-CopyRemoved 72865 -
    2017-02-13 rik5 Item GroupIncorrect Result Matlab Compatibility
        Operating SystemMicrosoft Windows Any
    2017-02-13 mtmiller StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code