Skip to content

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

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

Open
2 tasks done
ehennestad opened this issue May 6, 2025 · 1 comment

Comments

@ehennestad
Copy link
Collaborator

ehennestad commented May 6, 2025

What happened?

Following up on discussion/question in #703 (comment)

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
Copy link
Collaborator Author

ehennestad commented May 8, 2025

Idea: Generating type classes for different NWB format versions into separate namespaces, e.g
types.v270.core.NWBFile etc

Question: Is that going to be straight forward when taking extensions into account?

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

No branches or pull requests

1 participant