-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add navigation history to subcircuit click event #101
base: master
Are you sure you want to change the base?
Conversation
Any clue why that test might be failing? It seems unrelated to me, but I'm not sure. |
Unfortunately, I don't know. There seems to be some nondeterminism in the Worker engine which leads to some tests randomly (and very rarely) failing. Somehow, the test seems to think that the simulation didn't stop running. I looked at the code a few times now and can't really find the root cause (actually, couldn't really reproduce the issue on my machine). If you can find and fix the issue, it would be appreciated. |
Also, I'm not sure I like this change. Maybe it would be cleaner, and ultimately more useful, if models remembered their parent model. This way, you could reconstruct the "navigation history" when needed. |
You're right, I like that better as well; I'll look into it later this week. Who knows, maybe that'll also fix the strange testing issue. |
Wouldn't count on it. The issue unfortunately exists on the master branch, and it is nondeterministic - re-running the test sometimes shows no errors. |
I've changed it so that models now have a "parent" attribute which can be queried. Since top-level models are a bit different, there's also an "isTopLevel" attribute. It's currently essentially the same as checking whether |
I still haven't found a definitive root cause for this issue, however I do have a hypothesis. I cannot reproduce it locally either, but after increasing the default timeout in If I understand the code correctly, internally the following is happening:
I believe that the problem here is caused by how Again, this is only a hypothesis, but it would explain why this only happens for the worker engine, why increasing the timeout enough resolves the issue (although it's really not a proper fix), why I personally cannot reproduce this on my slower laptop and why it appears to be so nondeterministic. I'm not sure if I can find the time to actually test and implement a fix for this, but hopefully it helps. |
Adds a "navigation history" parameter to the subcircuit button click event introduced in #100. This is essentially an array of models that were visited to end up on the subcircuit that contained the button the user clicked on.