Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Implement a patient strategy for unresolveable proxy EObject #264

Closed
bergmanngabor opened this issue Aug 6, 2012 · 9 comments
Closed

Implement a patient strategy for unresolveable proxy EObject #264

bergmanngabor opened this issue Aug 6, 2012 · 9 comments
Labels
Milestone

Comments

@bergmanngabor
Copy link
Member

Currently EIQ attempts to resolve all proxies, and ignore unresolvable ones (as wall as the spurious RESOLVE notifications). Problem: some initially unresolvable proxies may become resolvable later after all.

Candidate strategy:

  • if unresolvable, put on a "patience" list
  • If a RESOLVE notification is received, compare it against this list. If matched, continue the "comprehension" of the model as before.

Open question:

  • is this strategy feasible e.g. if the set of observed types/features of a non-wildcard engine is extended between the first encounter of the proxy object and the time of resolution?

Raison d'être: Xtext inserts some unresolvable proxies that will magically become resolvable later, and will be resolved with RESOLVE notfications. Lack of RESOLVE support results in "Duplicate deletion" exceptions.

@ghost ghost assigned bergmanngabor Aug 6, 2012
@istvanrath
Copy link
Contributor

Is this a prerequisite of solving Oszkar's issue?

@OszkarSemerath
Copy link

Yes, it is.

@istvanrath
Copy link
Contributor

I also doubt that this is an Xtext-specific corner case, it rather seems to be something that is allowed by EMF in general and thus EMF-IncQuery should be prepared to support it.

@bergmanngabor
Copy link
Member Author

@istvanrath unresolved != unresolvable. These proxies are unresolvable, which is something we were not prepared for so far. In fact, there does not seem to be any way to detect when these proxies become resolvable, except when they are actually resolved. So far, Xtext seems to be nice enough to proactively resolve them.

bergmanngabor added a commit that referenced this issue Aug 7, 2012
@bergmanngabor
Copy link
Member Author

Solution attempt failed: neither this resolve message, nor the corresponding "set" is reliable enough.

Culprit is org.eclipse.xtext.linking.lazy.LazyLinkingResource:

    try {
        source.eSetDeliver(false);
        source.eSet(crossRef, target);
    } finally {
        source.eSetDeliver(true);
    }

This is bad news.

@OszkarSemerath
Copy link

I updated my branch but I still have an exception that the previous commit suppose to clean.
Stacktrace: https://gist.github.com/3287073

@bergmanngabor
Copy link
Member Author

@OszkarSemerath if you recall our discussion, we have agreed that we cannot solve this issue without patching Xtext. Obviously, the previous commit is not supposed to solve this either, and it does not claim to (the commit comment even calls the attempt doomed). There is nothing surprising in your findings, move along...

@bergmanngabor
Copy link
Member Author

I have filed a bug report with Xtext:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=387119

Let's hope for the best.

@bergmanngabor
Copy link
Member Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants