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

Multiple QuAMs causing issues with references #58

Open
JacobHast opened this issue Jul 11, 2024 · 3 comments
Open

Multiple QuAMs causing issues with references #58

JacobHast opened this issue Jul 11, 2024 · 3 comments

Comments

@JacobHast
Copy link
Collaborator

When initializing multiple quam roots in a single script something appears to go wrong with referencing. I'm not sure when it makes sense to initialize multiple quams, but in my case this has caused some hard-to-find bugs when testing various things out. If initializing multiple roots is not allowed, maybe a suggestion would be to raise an error if it happens.

image

@nulinspiratie
Copy link
Contributor

You're right, creating multiple QuamRoot objects causes issues because QuamBase._root is always set to the latest QuAM, which is needed for absolute referencing to work.
However, I don't see a straightforward solution for this. There are several situations where one would create a new QuamRoot object. For instance, if one is running a live kernel and loads QuAM multiple times.

I will keep this open, but for now I don't see a solution that wouldn't introduce significant overhead. @JacobHast if you have suggestions please let me know

@JacobHast
Copy link
Collaborator Author

I see. Would it be possible to add a warning when creating a new root if a root already exists to facilitate debugging?

@nulinspiratie
Copy link
Contributor

At least for now I wouldn't want it as a warning because that usually shows up by default. I could do logging.info, which will or will not show up depending on the log filtering. Does that work?

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

2 participants