matnwb icon indicating copy to clipboard operation
matnwb copied to clipboard

[Bug]: Generating a different version of NWB schema can cause class-level conflict errors

Open ehennestad opened this issue 6 months ago • 1 comments

What happened?

Following up on discussion/question in https://github.com/NeurodataWithoutBorders/matnwb/issues/703#issuecomment-2851179725

Is there a way to detect this version change and clear specifically the classes causing the problem?

@bendichter I have explored this and although the MATLAB documentation seems to suggest that it is possible to clear specific classes, I don't manage to make this work in practice.

Also, MATLAB will update class definitions in memory when they are updated in file, but for some reason this does not work perfectly when regenerating MatNWB type classes. It might be because a full set of classes and superclasses are generated in one go, but it is very difficult to pinpoint. Maybe something to bring up with MathWorks

Steps to Reproduce

runtests('tests.unit.nwbReadTest/readFileWithIncompatibleVersion')

Error Message

N/A

Operating System

macOS

Matlab Version

All releases

Code of Conduct

ehennestad avatar May 06 '25 17:05 ehennestad