Option to avoid MCOS parsing
Given that the Matlab Class Object System (MCOS) is undocumented and subject to change per MATLAB version, perhaps we should add the option to skip MCOS parsing to MAT.jl. We could then drop missing types in the output whenever we encounter MCOS types.
In that way people can at least read the other types in a mat file whenever an error occurs.
We have two options in my mind:
- add some strategic try/catches in the subsystem code and output missings (and warnings)
- provide an option to the user to skip every MCOS type:
matread("test.mat"; skip_mcos=true)
I prefer the 2nd option, to encourage users to keep opening issues for future MATLAB versions.
I think we could add a try-catch inside read_opaque (don't remember the method name exactly). If loading fails, then we simply return the metadata and display a warning. We would also need to load the subsystem within a try-catch block and use a flag to make sure its set. We could use two separate blocks - one for loading the object and one for conversion (if conversion fails we return raw object properties).
In my opinion it is best to abstract away anything related to MCOS from the end user, but then a tradeoff would be continuous development as you mentioned.