octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45833] support load/save of classdef objects


From: Thomas
Subject: [Octave-bug-tracker] [bug #45833] support load/save of classdef objects
Date: Fri, 11 Jul 2025 19:33:48 -0400 (EDT)

Follow-up Comment #27, bug #45833 (group octave):

Sorry for my tardy replies. I was debugging a fairly painful MacOS issue when
it came to building Octave that was related to some external packages from a
Homebrew update... Anyways, that's now fixed, I've tested your patches, and
everything that is known to work seems to work well!

> Afaict, the `regular_class_with_constructor` classdef doesn't actually have
> the `(ConstructOnLoad)` attribute.
> Am I missing something?

> Also in the currently disabled test for "Transient" properties, should the
> comment say "Transient property should not be saved and loaded"? 

No, you are correct and not missing anything, these were mistakes on my part.

> The attached updated version of the part3 patch addresses the remaining
> questions about it:
> It adds a new classdef file with a class that has the "ConstructOnLoad"
> attribute.
> It enables the (currently failing) test for the "Transient" property
> attribute and negates the comment.
> It tags all tests that are currently failing with this bug report number. If
> we prefer to open separate reports for (some or all of) these issues, we can
> still do that.

You are totally correct to apply fixes on all these points. I don't know what
I was testing before, but the Transient attribute does seem able to be parsed.
That is why I disabled the test btw, I was expecting a parse error for some
reason...

> The attached patch is a slightly cleaned up version of the part4 (loading N-d
> arrays) that applies on top of the latest version of part3.
> It also adds a (currently failing) test with a 2-d array of classdef objects
> that references bug #65179 (where reshaping classdef arrays could be
> implemented).

> If no one opposes, that patch could probably also be applied.

This is really cool, I tried it and it seems to work for 1xN arrays at least,
including the statistics package example from Dmitri. I certainly don't oppose
it.

> Regarding the handling of handle classes: If I understand correctly,
> @foreverallama already has an implementation for loading handle classes
> (including ones with circular self-references).
> Maybe, we could try and share that idea for all file formats. 

I will have a look at this. I don't necessary want to start a parallel third
conversation, so I'll reply more in-depth on Discourse/GitHub when I've
thought more about it. But I suspect, like my issue with custom loadobj return
types, that it would require a pretty significant refactoring of the
saving/loading chain of events happening as of right now. But perhaps that
might end up being a boon, because I've also noticed that the loading and
saving of classdefs seems awfully slow.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?45833>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]