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

 
 

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

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

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 02 Jan 2022 01:13:25 PM UTC, comment #6: 

The whitespace before '--' and '++' is now removed in vfzero.m and lsqlin.m. Closing as fixed.

Olaf Till <i7tiol>
Group Member
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>
Group 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>
Group administrator
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>
Group administrator
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

 

Depends on the following items

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by i7tiol (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (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
    2022-01-02 i7tiol StatusNone Fixed
        Open/ClosedOpen Closed
    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.13-758e.
    Corresponding source code