Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt reading old-style Matlab class in v7.3 as struct #198

Merged
merged 2 commits into from
May 20, 2024

Conversation

Jeroen-van-der-Meer
Copy link
Contributor

If you save an old-style Matlab object (i.e. created in an @ClassName folder, before classdef was a thing) in a v7.3 file, MAT.jl throws an error saying it cannot read from a non-struct group (cf. line 232 of MAT_HDF5.jl). As a matter of fact, it appears that Matlab saves these objects 'as if' they are structs, and indeed the objects that I have appear to be read just fine if I manually remove the error and let the code continue.

Instead of throwing an error, I would propose giving a warning, such as

@warn "Unknown non-struct group of type $mattype detected; attempting to read as struct"

in case it can, in fact, be read properly.

@ViralBShah ViralBShah merged commit 4d33c78 into JuliaIO:master May 20, 2024
8 of 11 checks passed
@ViralBShah
Copy link
Contributor

@Jeroen-van-der-Meer Would it be useful for you to have commit access to this package, so that merges don't have to wait this long? I just happened to notice this PR and it seemed straightforward to merge.

@musm
Copy link
Member

musm commented May 20, 2024

I think we just forgot about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants