Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364446 - [xtext][builder] link errors with projects containing multiple grammars
Summary: [xtext][builder] link errors with projects containing multiple grammars
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-22 04:05 EST by Knut Wannheden CLA
Modified: 2017-09-19 17:16 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Wannheden CLA 2011-11-22 04:05:20 EST
If an Xtext project contains multiple interdependent Xtext grammars a build is likely to result in linking error markers. The reason is that the Xtext language implementation doesn't use the lazy linker and all linking is already done as part of the first build phase. At this point any referenced EPackages may not yet be present in the index (e.g. when doing a clean build).

The builder is likely to keep the Xtext grammar resource in its resource set for the second build phase. Again as the lazy linker isn't used the linking errors remain.

Either the Xtext implementation should start using the lazy linker or the builder must be able to detect such situations and reload the resources in the second build phase. Or maybe both.
Comment 1 Knut Wannheden CLA 2011-11-22 04:07:09 EST
A workaround is to use platform:/resource URIs instead of the EPackage nsURIs when importing EPackages. This works because these are not resolved against the index.
Comment 2 Sebastian Zarnekow CLA 2011-11-22 05:51:18 EST
We'll use the DerivedStateAwareResource for the Xtext language and do the complete linking as part of the derived state computation.
Comment 3 Sebastian Zarnekow CLA 2011-11-22 10:44:39 EST
Pushed to master.
Comment 4 Karsten Thoms CLA 2017-09-19 17:04:47 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:16:45 EDT
Closing all bugs that were set to RESOLVED before Neon.0