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

[pivot] ToStringVisitor can resolve proxies #2345

Open
eclipse-ocl-bot opened this issue Sep 26, 2024 · 2 comments
Open

[pivot] ToStringVisitor can resolve proxies #2345

eclipse-ocl-bot opened this issue Sep 26, 2024 · 2 comments

Comments

@eclipse-ocl-bot
Copy link
Collaborator

| --- | --- |
| Bugzilla Link | 583347 |
| Status | NEW |
| Importance | P3 normal |
| Reported | Jun 13, 2024 06:11 EDT |
| Modified | Jun 19, 2024 04:31 EDT |
| Reporter | Ed Willink |

Description

ToStringVisitor is a useful debugging aid, but it uses methods such as getReferredLiteral that resolve proxies. This may sometimes be useful, but more often is confusing since the addition of debug changes the state. Worse if used in for instance an unload(), the resolution may provoke a load during unload and even a multi-content CME for getAppliedProfile. Debug toString() added to debug one problem can be ofuscated by extra bugs from the debug.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on Jun 13, 2024 06:37

testImport_CompleteOCL_UML fails badly once

if ("my::AType::referenced() : my::BType[?]".equals(toString())) {\
getClass();				// XXX\
}

added to PivotObjectImpl.resetESObject()

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on Jun 19, 2024 04:31

Making ToStringVisitor safe is hard since basicGetXXX for required features needs a cast to the Impl class. Harder is to fix eContainer and getType in the hierarchical name.

Simpler, set a trap for invocation of PivotObjectImpl.eResolveProxy while ToStringVisitor is active. But that costs for every eResolveProxy.

Maybe a trap for ToStringVisitor activation if e.g. unload has declared an immutable region e.g. when PivotEnvironmentFactory.isDisposing()

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

No branches or pull requests

1 participant