bugGNU Octave - Bugs: bug #65694, (ga) "test ga" fails...

 
 

bug #65694: (ga) "test ga" fails with octave 9.x

Submitter:  Dmitri A. Sergatskov <dasergatskov>
Submitted:  Mon 06 May 2024 12:52:32 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * stable Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 07 May 2024 11:54:20 AM UTC, comment #5: 

@nrjank - i will work on a new release that includes the latest changes

John Donoghue <lostbard>
Group Member
Mon 06 May 2024 08:33:44 PM UTC, comment #4: 

ok, looks like that change was made in January with
https://sourceforge.net/p/octave/ga/ci/be9e984cf0ba32a208c67c5d6dbdf9e90ee0f44a/

it will be part of the next ga package version release.

Nicholas Jankowski <nrjank>
Group Member
Mon 06 May 2024 05:08:51 PM UTC, comment #3: 

@lostbard - can that quick change to the tests get pushed out for octave v9 compatibility?

Nicholas Jankowski <nrjank>
Group Member
Mon 06 May 2024 05:07:56 PM UTC, comment #2: 

Good catch! Thanks. I was staring at this line for some time trying to figure out what is wrong with it.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 06 May 2024 05:03:24 PM UTC, comment #1: 

that appears to be coming from the use of ** instead of ^, which was removed in v9:


The following features were deprecated in Octave 7 and have been removed from
Octave 9.

...

- Operators

        Operator | Replacement
        ---------|------------
        .+       | +
        .+=      | +=
        .-       | -
        .-=      | -=
        **       | ^
        **=      | ^=
        .**      | .^
        .**=     | .^=


i replaced those occurrences in my copy of ga.m and then test ga passes.

Nicholas Jankowski <nrjank>
Group Member
Mon 06 May 2024 12:52:32 PM UTC, original submission:  

With 9.2 pre-release I see:

octave:1> pkg load ga
octave:2> test ga verbose
>>>>> /home/dima/.local/share/octave/api-v59/packages/ga-0.10.3/ga.m
***** shared f, nvars
 f = @rastriginsfcn;
 nvars = 2;
***** error x = ga ()
***** error x = ga (f)
***** error x = ga (f, nvars, [])
***** error x = ga (f, nvars, [], [], [])
***** error x = ga (f, nvars, [], [], [], [], [])
***** error x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []], gaoptimset (), [])
***** function f = ff (nvars)
  f = @(x) sum (x(:, 1:nvars) .** 2, 2);
!!!!! test failed: syntax error
parse error:

  anonymous function bodies must be single expressions

>>> function f = ff (nvars)
  f = @(x) sum (x(:, 1:nvars) .** 2, 2);
                                    ^
shared variables
    f = @rastriginsfcn
    nvars = 2
-verbose-

Total 6 failures. On Linux and Windows.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>

 

(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 lostbard (Posted a comment)
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by dasergatskov (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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-05-06 nrjank Carbon-Copy- Added @lostbard

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code