Bug 461054 - "Don't resolve expressions during indexing!" when surrogate pattern has eval constraint
Summary: "Don't resolve expressions during indexing!" when surrogate pattern has eval ...
Status: RESOLVED FIXED
Alias: None
Product: Viatra
Classification: Modeling
Component: Query (show other bugs)
Version: oldinquery   Edit
Hardware: Macintosh Mac OS X
: P3 normal
Target Milestone: 1.0 M1   Edit
Assignee: Project Inbox CLA
QA Contact: Istvan Rath CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 460028
  Show dependency tree
 
Reported: 2015-02-27 10:17 EST by Denes Harmath CLA
Modified: 2015-03-02 17:11 EST (History)
1 user (show)

See Also:


Attachments
Minimal example metamodel (1020 bytes, application/octet-stream)
2015-02-27 10:17 EST, Denes Harmath CLA
no flags Details
Exception Stack Trace (7.23 KB, text/plain)
2015-02-27 10:18 EST, Denes Harmath CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denes Harmath CLA 2015-02-27 10:17:21 EST
Created attachment 251168 [details]
Minimal example metamodel

Given an example metamodel (attached), if we create the following query definition:

import "http://foo"
import "http://www.eclipse.org/emf/2002/Ecore"

@Surrogate(feature = "derived")
pattern fooDerived(foo: Foo, value: EString) {
	Foo.notDerived(foo, notDerived);
	value == eval(notDerived.toUpperCase);
}

Pattern fooDerived has an error:
Error building generic query specification

The Error Log contains multiple instances of the following exception for multiple fragments in the query definition resource:
org.eclipse.xtext.xbase.resource.BatchLinkableResource  - Don't resolve expressions during indexing!
Comment 1 Denes Harmath CLA 2015-02-27 10:18:11 EST
Created attachment 251169 [details]
Exception Stack Trace

Stack trace attached.
Comment 2 Denes Harmath CLA 2015-02-27 10:20:36 EST
Strangely, the error does not occur on the first save, just afterwards.
Comment 3 Denes Harmath CLA 2015-02-27 11:21:02 EST
IncQuery commit: 622fdd7
Comment 4 Zoltan Ujhelyi CLA 2015-02-27 13:11:46 EST
Should be fixed in master. I turned off the generic loading support for surrogates entirely; it caused lots of nasty side-effects.
Comment 5 Denes Harmath CLA 2015-03-02 05:22:51 EST
The fix is confirmed to work.
Comment 6 Zoltan Ujhelyi CLA 2015-03-02 17:11:32 EST
As comment #5 described, this issue is already fixed.