bugGNU Octave - Bugs: bug #58580, Changes to classdef files and...

 
 

bug #58580: Changes to classdef files and additions to +package folders aren't reflected without magic incantations

Submitter:  Neil Konzen <waterdog1>
Submitted:  Tue 16 Jun 2020 03:44:11 AM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  1 - Later Item Group:  Incorrect Result
Status:  Postponed Assigned to:  None
Originator Name:  waterdog1 Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 16 Jun 2020 04:57:20 AM UTC, comment #2: 

Didn't mean to be snippy: I do understand it's a huge feature, and it's amazing you guys have been able to get as far as you have.

So all that's needed is clear classes? I ended up doing clear all; clear classes; clear functions; rehash but probably not all of that was necessary.

Those are great suggestions, I'll use them. How about changing this bug report to a documentation request, to put your suggestions in the classdef docstring and manual.  Then you could close this bug out completely, rather than leaving it postponed.

Neil Konzen <waterdog1>
Tue 16 Jun 2020 04:48:42 AM UTC, comment #1: 

Thank you for your bug report.  Please note, that Octave developers have only limited resources to work on such a huge feature, such as introducing object-orientated programming (OOP).

That things are not working 1:1 as in Matlab is documented in the manual.

> Since version 4.0, Octave has limited support for classdef classes. [...]  An overview of what is missing can be found at https://wiki.octave.org/Classdef.


https://octave.org/doc/v5.2.0/classdef-Classes.html

A few rule of thumb I figured out when working with classdef myself:

- use basic classdef OOP features
- use https://www.octave.org/doc/v5.2.0/XREFkeyboard.html for debugging
- use `clear classes` https://www.octave.org/doc/v5.2.0/XREFclear.html a few times.  After breaking code changes, restart your Octave session.

Kai Torben Ohlhus <siko1056>
Group Member
Tue 16 Jun 2020 03:44:11 AM UTC, original submission:  

Changes to classdef .m files or additions to matlab-style "+package" folders aren't reflected in running code unless "clear all;clear classes;rehash" or similar incantation is done.

Actually I'm not 100% sure what the minimum incantation required is to make things work.  In a few cases I found I had to exit and restart Octave for things to work properly, but perhaps that is because I wasn't using the right commands to reset everything.

This kind of behavior will occasionally occur in Matlab, but not nearly as often.

At a minimum, this behavior should be well documented, with the proper, minimum-length incantation to be used to clear whatever internal caches are being used by Octave.


Neil Konzen <waterdog1>

 

(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 siko1056 (Posted a comment)
  • -email is unavailable- added by waterdog1 (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-16 siko1056 Severity3 - Normal 1 - Wish
        Priority5 - Normal 1 - Later
        StatusNone Postponed
        Release5.2.0 dev
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code