Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Help with finding a building? bug.
Help with finding a building? bug. [message #1839088] Fri, 12 March 2021 18:29 Go to next message
Anthony Harrison is currently offline Anthony HarrisonFriend
Messages: 3
Registered: July 2009
Junior Member
Help! I've been working with Xtext for about a year and feel pretty comfortable. I've got a fairly complex language for specifying AI models. It's been working quite well up until I recently updated all of my Eclipse installations, including moving from 2.24 to 2.25, and fully updating from Java11 to 15. Somewhere in that process I introduced a new anomalous behavior. Let me describe that behavior and maybe you can point me in a debugging direction, because I'm at a loss.

On a fresh start of Eclipse, I can open and edit my language files with no problem. Fast and normal validators all work as expected. However, after the first save, any subsequent edits will trigger a series of validation errors for what were previously valid parses. The validation errors all relate to content that was imported using xtext's importNamespace magic. I can manually delete the problem markers and go about business as usual until I have to edit the language file, when the process repeats.

Furthermore, the validation errors are not just for the source file edited, but also its copy residing in the compilation folder (i.e., bin/). This seems to be new behavior. I don't recall the validators running on the compiled folder before. Did I screw up a setting to trigger this?

It seems like after validating in the editor, the builder is being triggered but for some reason it's not resolving the imports correctly.

I've verified that none of my validators are throwing exceptions or the like. I've verified that the language behaves as expected in standalone mode (i.e., valid files don't throw import related validation errors). It's just in the GUI mode that I'm getting this parallel behavior, one with no validation errors, the other with import related failures.

I'm at a loss. I'm looking for classes to debug or enable logging for, maybe some undocumented configuration to prevent parsing of the bin/ folder (to test that theory). Anything.

Many thanks.
Re: Help with finding a building? bug. [message #1839089 is a reply to message #1839088] Sat, 13 March 2021 05:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
You should debug the build
(ClusteringBuilderState,DefaultResourceDescriptionStrategy)
So see what is indexed, built, deleted etc
And the Linking in DefaultLinkingService
And why bin files are validated
E.g. JdtHelper
can you also clarify if this is related to editing in the editor at all
or just build related (e.g happening too when editing on filesystem and refreshing in eclipse)
can you also erlaborate what kind of projects the model projects are (plain, java, plugin, buildship) and also test the osgi status of all xtext plugins e.g. using host osgi console and the ss command
same for the kind of errors you get. what do you mean by "import related" do you mean linking errors (could not resolve reference)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Sat, 13 March 2021 08:45]

Report message to a moderator

Re: Help with finding a building? bug. [message #1839096 is a reply to message #1839089] Sat, 13 March 2021 16:57 Go to previous messageGo to next message
Anthony Harrison is currently offline Anthony HarrisonFriend
Messages: 3
Registered: July 2009
Junior Member
Thanks for the breadcrumbs.

To answer your questions:
1) the projects are plugin projects.
2) all the xtext bundles are started (according to the PDE tools)
3) By "import related" I do mean linking errors ("Couldn't resolve reference to X")
4) It appears to be build related from your diagnostic (I edited a comment outside of eclipse, saved, refreshed, and the error repeats)

So I am correct in assuming that the project output folder is supposed to be suppressed from parsing/validation? That's what JdtHelper suggests. Guess I'll start there.

I verified that my output folder for the project is fine.

I will try those debug targets next.
Thanks again.
Re: Help with finding a building? bug. [message #1839114 is a reply to message #1839096] Sun, 14 March 2021 19:11 Go to previous messageGo to next message
Anthony Harrison is currently offline Anthony HarrisonFriend
Messages: 3
Registered: July 2009
Junior Member
Resolved.

It was an incorrectly written extension that was calling the standalone injector instead of the activator's injector. As a result the Xtext singletons were getting F'ed up.

The challenges of writing for both IDE and standalone.

Thanks again for the help.
Re: Help with finding a building? bug. [message #1839120 is a reply to message #1839114] Mon, 15 March 2021 05:46 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Not entirely. 10 years ago I raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=340408 which could have diagnosed this for you.

Regards

Ed Willink
Previous Topic:Missing EOF error
Next Topic:hot deployment with gradle
Goto Forum:
  


Current Time: Tue Apr 23 11:45:31 GMT 2024

Powered by FUDForum. Page generated in 0.03755 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top