Some origin information is lost during analysis
I’m getting the following error in the dynsem project (master:b80e4b2) that I don’t understand
Message:Could not determine term corresponding to Entity(“BlogPosting”,[Property(“poster”,Type(“User”)),Property(“body”,Type(“String”))]) in resulting AST; using next best match Node(“BlogPosting”,[Node(“poster”,[]),Node(“body”,[])])
Stack Trace:
java.lang.RuntimeException: Could not determine term corresponding to Entity(“BlogPosting”,[Property(“poster”,Type(“User”)),Property(“body”,Type(“String”))]) in resulting AST; using next best match Node(“BlogPosting”,[Node(“poster”,[]),Node(“body”,[])])
at org.strategoxt.imp.runtime.Environment.logWarning(Environment.java:424)
at org.strategoxt.imp.runtime.stratego.StrategoTermPath.getTermPathWithOrigin(StrategoTermPath.java:183)
at org.strategoxt.imp.runtime.stratego.StrategoTermPath.getTermPathWithOrigin(StrategoTermPath.java:111)
at org.strategoxt.imp.runtime.services.outline.SpoofaxOutlinePage.textSelectionToOutlineSelection(SpoofaxOutlinePage.java:179)
at org.strategoxt.imp.runtime.services.outline.SpoofaxOutlinePage.selectionChanged(SpoofaxOutlinePage.java:137)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
at org.eclipse.jface.text.TextViewer.fireSelectionChanged(TextViewer.java:2738)
at org.eclipse.jface.text.TextViewer.selectionChanged(TextViewer.java:2717)
at org.eclipse.jface.text.TextViewer$4.widgetSelected(TextViewer.java:1836)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4166)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1474)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
at org.eclipse.swt.custom.StyledText.sendSelectionEvent(StyledText.java:8071)
at org.eclipse.swt.custom.StyledText.doSelection(StyledText.java:3226)
at org.eclipse.swt.custom.StyledText.doMouseSelection(StyledText.java:2839)
at org.eclipse.swt.custom.StyledText.doMouseLocationChange(StyledText.java:2824)
at org.eclipse.swt.custom.StyledText.handleMouseMove(StyledText.java:6071)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5641)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4166)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1474)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4012)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3651)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)Session data:
eclipse.buildId=4.3.0.I20130605-2000
Submitted by Eelco Visser on 24 July 2013 at 13:07
java.version=1.6.0_51
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.standard.product -keyring /Users/eelcovisser/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.standard.product -keyring /Users/eelcovisser/.eclipse_keyring -showlocation
Issue Log
This warning indicates that some origin information is missing and it could not find the path, so it applies some heuristics to find the next best match. Why is this an error, is it causing problems for you?
It is causing the error log to pop up continuously, which is quite annoying. Also it seems there is a problem that needs solving.
You can turn off the error log popping up by pressing the down facing arrow and unticking “Activate on new events”. Yes I know this could be a problem, just making sure that this is not a major issue. Some origins may still get lost in the name binding analysis.
As Guido and I have learned at the LIXD workshop, these types of error messages or warnings can be extremely confusing to (new) developers. We should work hard(er) at the programmer experience of Spoofax. There are too many points at which language engineers can get stuck. Explanations that are (only) obvious to the incrowd are not acceptable.
Yes, especially origins are a big problem because they are invisible, based on heuristics and easily get lost. If they get lost some stuff suddenly breaks without knowing why. Even we have trouble with origins sometimes. But this is not NaBL/task engien related so we should create some issues for this in the Spoofax project.
Log in to post comments