-
Notifications
You must be signed in to change notification settings - Fork 3
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
Incorrect engine setup results in duplicate deletion errors #26
Comments
This avoids _some_ duplicate addition/deletion events, but there are still more issues that need further debugging to avoid.
Experiments to fix inconsistent project setup issues
|
It seems maybe the base index should be deattached before project closure? |
It not only appears when the project closes. Removing containment hierarchies can have the same effect. |
Commit a0fa9cf adds a test case where we could demonstrate the duplicate EMF notifications using a single model delete (without relying on VIATRA). We have discussed with @istvanrath in person that we should try to make this error message more user-friendly (e.g. do not include all details unless log level is set to info/debug or maybe reduce the default severity to |
In addition to the suppression, the minimal test case for duplicate detection was retrofitted to check that log levels.
A quick solution was merged of notification suppressing - to have a cleaner solution we have to provide an API in VIATRA for it that takes longer time to implement. The API request is tracked by bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=549955 |
This reverts commit 1d9b398 because the Base index internals cannot be overridden appropriately.
This change rewrites MagicDrawProjectNavigationHelper to rely on the latest VIATRA features to cleanly suppress duplicate notification errors. Note: to test out the changes, we have to deploy a SNAPSHOT build to Nexus; this build temporarily relies on VIATRA v2.3.0-SNAPSHOT instead of 2.2.0/2.2.1; before this is fixed we should not create any release for V4MD.
Recently I have seen a lot of Duplicate deletion errors coming from VIATRA Base when working with MagicDraw models.
It seems that is caused by an incorrect engine setup: in https://github.com/viatra/v4md/blob/master/com.incquerylabs.v4md/src/main/com/incquerylabs/v4md/ViatraQueryAdapter.java#L57 all models of a projects are collected and then added to the base index as model roots.
Such a code is required as external models from TWS/TWC are not contained in the original project root; however it is problematic as e.g. in case of local projects referenced models are contained.
We should update the engine setup to handle such cases correctly.
The text was updated successfully, but these errors were encountered: