bugGNU Octave - Bugs: bug #60920, [octave forge] (optim) New...

 
 

bug #60920: [octave forge] (optim) New warnings on loading package

Submitted by:  None
Submitted on:  Thu 15 Jul 2021 06:02:45 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  dev
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Mon 19 Jul 2021 04:48:58 PM UTC, comment #5: 

I believe that is the way that Matlab parses this syntax because it doesn't have "++" or "--" operators.  When I made the previous change, I made the "OP=" operators special so that they are not recognized as command-style syntax arguments but I missed others.

I believe Matlab command-style parsing depends on whitespace.  For example, "foo - var" (expression) vs. "foo -var" (command), correct?  And the behavior may be different at the command line vs. in a function or script.

So I'm not sure what the best solution is for providing a reasonable degree of compatibility vs. Octave extensions to the Matlab language.

John W. Eaton <jwe>
Project Administrator
Mon 19 Jul 2021 03:51:51 PM UTC, comment #4: 

Thank you for the tests.

Possibly dependent on bug #60882.

Markus Mützel <mmuetzel>
Project Member
Mon 19 Jul 2021 03:51:18 PM UTC, comment #3: 

I have submitted a separate bug report bug #60941 about the whitespace behavior that is independent of this optim package behavior. If that accounts for all of the optim behavior, then this report can be closed. Thank you.

Anonymous
Mon 19 Jul 2021 03:43:25 PM UTC, comment #2: 

I get an internal error about the invalid use of a symbol as both a variable and a command. This is with Octave version 7 (hg id: bc19d9360bac).

The culprit seems to be the whitespace between a variable and the increment or decrement operator. Maybe this is a new change?

octave:1> pkg load optim
warning: optimset: no defaults for function 'lsqlin'
warning: called from
    __all_opts__ at line 62 column 9
    /path/to/optim-1.6.1/PKG_ADD at line 6 column 5
    load_packages_and_dependencies at line 56 column 5
    load_packages at line 53 column 3
    pkg at line 590 column 7

warning: optimset: no defaults for function 'vfzero'
warning: called from
    __all_opts__ at line 62 column 9
    /path/to/optim-1.6.1/PKG_ADD at line 22 column 5
    load_packages_and_dependencies at line 56 column 5
    load_packages at line 53 column 3
    pkg at line 590 column 7

octave:2> which lsqlin
error: parse error near line 118 of file /path/to/optim-1.6.1/lsqlin.m

  n_out: invalid use of symbol as both variable and command

>>>     n_out --;
       ^
octave:3> which vfzero
error: parse error near line 285 of file /path/to/optim-1.6.1/vfzero.m

  niter: invalid use of symbol as both variable and command

>>>       niter ++; nfev ++;
         ^
octave:4> lsqlin ('defaults')
error: parse error near line 118 of file /path/to/optim-1.6.1/lsqlin.m

  n_out: invalid use of symbol as both variable and command

>>>     n_out --;
       ^
octave:5> vfzero ('defaults')
error: parse error near line 285 of file /path/to/optim-1.6.1/vfzero.m

  niter: invalid use of symbol as both variable and command

>>>       niter ++; nfev ++;
         ^

Anonymous
Mon 19 Jul 2021 06:47:38 AM UTC, comment #1: 

The optim package initializes its own functions (incl. "lsqlin" and "vfzero") on load.
It looks like those functions fail initialization.
Are they in Octave's load path after "pkg load optim"? What does "which lsqlin" and "which vfzero" return after you loaded the package?
What do you see when calling `lsqlin('defaults')` and `vfzero('defaults')`?

Markus Mützel <mmuetzel>
Project Member
Thu 15 Jul 2021 06:02:45 PM UTC, original submission:  

This didn't happen before. Not sure what's to be changed? I don't even use the functions lsqlin or vfzero so this warning is perplexing.

octave:4> pkg load optim
warning: optimset: no defaults for function 'lsqlin'
warning: called from
    __all_opts__ at line 62 column 9
    /path/to/optim-1.6.1/PKG_ADD at line 6 column 5
    load_packages_and_dependencies at line 56 column 5
    load_packages at line 53 column 3
    pkg at line 590 column 7

warning: optimset: no defaults for function 'vfzero'
warning: called from
    __all_opts__ at line 62 column 9
    /path/to/optim-1.6.1/PKG_ADD at line 22 column 5
    load_packages_and_dependencies at line 56 column 5
    load_packages at line 53 column 3
    pkg at line 590 column 7

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2021-07-19 mmuetzel StatusNeed Info => None
        Dependencies- => Depends on bugs #60882
    2021-07-19 mmuetzel StatusNone => Need Info
        SummaryNew warnings on loading package optim => [octave forge] (optim) New warnings on loading package

    Back to the top


    Powered by Savane 3.6