[bug #68237] "load" emits long series of "classdef not found" warnings when loading classdef arrays w/o definition
Rik <[email protected]> Tue, 21 Apr 2026 03:52:56 -0400 (EDT)
| Newsgroups | gmane.comp.gnu.octave.bugs |
|---|---|
| Message-ID | <[email protected]> |
Please use the bug tracker to post updates to a bug report. The mailing list is intended as a read-only notification stream. Info posted to this mailing list address won't appear in the tracker database where it is most useful.
Update of bug #68237 (group octave):
Status: Patch Submitted => Fixed
Open/Closed: Open => Closed
Fixed Release: None => 12.1.0 (current default)
_______________________________________________________
Follow-up Comment #25:
Thanks forevverallama for a nice changeset. I made some amendments and
checked it in at https://hg.savannah.gnu.org/hgweb/octave/rev/daae7cef90aa.
The changeset was brief, but it turns out that writing the commit message took
longer than actually making the change.
The GNU standards for commit messages which Octave inherits are kind of
cumbersome, but they are useful later for understanding what happened.
The quick guide is
One-line summary of entire changeset (bug #XXXXX)
[A paragraph describing the architectural approach of the changeset.
This is optional for small changesets, or where it is very obvious
what is happening.]
* filename.ext (function|class|major component): Description of WHAT was
changed, not particularly WHY (that is in the optional paragraph).
(function2|class2|component2): Description of WHAT changed for another
object in the same file.
Here is the commit message I wrote for this changeset.
Optimize class lookup for .mat files during load (bug #68237)
Use a cache of type std::unordered_set to record the name of classes
not found during load operation. Subsequent loads of objects with
missing classes will be detected quickly (O(1)) and alternate load
attempted.
* ls-mat-subsys.h: #include <unordered_set>
(class subsystem_handler): New private data member "m_missing_classes" of
type std::unordered_set.
(add_missing_class): New method to add classname to "m_missing_classes".
(is_missing_class): New method to check classname against cache.
* ls-mat5.cc (read_mat5_binary_element): Call octave_quit() within loops
for reading each element of a cell and each field of a struct.
* ls-mat-subsys.cc (load_mcos_object): Check cache of missing classes before
calling lookup_class() and return immediately if found. If lookup_class()
fails, add classname to cache and emit warning.
* warning_ids.m: Add "classdef-not-found" and "classdef-not-supported"
warning
IDs.
This is still more verbose then what Octave author jwe would write. He often
just uses "New method" since that was the change that was made. There's no
absolutely correct answer here.
Marking bug as Fixed and closing report.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68237>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaecs2AAKCRCqLAuaBUf3 TgmWAP4wTBvEyyV1JZb+sPIusvHDg6085KW0aykk2RzPsA+yjAEAqD0cBQXD/kBj vQlZa8BgsDQpGs1fO7gPr9F3bBWk6g8= =WhOP -----END PGP SIGNATURE-----