Cyclic linking detected in Maven build [message #1773531] |
Thu, 28 September 2017 18:49  |
Eclipse User |
|
|
|
Hi,
I've been reading about cyclic linking issues with Xtext projects. Specifically from:
1. Cyclic linking problems in builds of an incquery project
2. Cyclic linking detected when building in maven
I'm working on this DSL (here is the Xtext project). I created a local example and it works well
in an Eclipse plug-in. However, in a Maven project the build fails because of a cyclic link.
This is the Maven output:
[INFO] Starting validation for input: 'Client.amelia'
[INFO] Starting validation for input: 'Deployment.amelia'
[ERROR] ERROR:<validation errors because of failed Java generation>
[INFO] Starting validation for input: 'Server.amelia'
[INFO] Starting validation for input: 'FraSCAti.amelia'
[ERROR] ERROR:Cyclic linking detected : ExtensionDeclaration.element->ExtensionDeclaration.element (file:/.../FraSCAti.amelia line : 5 column : 10)
[ERROR] ERROR: <validation errors because of failed Java generation>
[INFO] Starting validation for input: 'Java1_6u23.amelia'
A type in my language may include and/or depend on another type. That is an extension declaration.
Types are defined in separate files. This issue is very similar to the one described in the incquery
bug report (link 1). I followed their recommendation to see if it works, and it did. That is, renaming the
files to affect the other on which Xtext process them. The following is the Maven output corresponding
to the same project, but renaming the files to avoid the cyclic linking:
[INFO] Starting validation for input: 'A_Java1_6u23.amelia'
[INFO] Starting validation for input: 'B_FraSCAti.amelia'
[INFO] Starting validation for input: 'C_Server.amelia'
[INFO] Starting validation for input: 'D_Client.amelia'
[INFO] Starting validation for input: 'E_Deployment.amelia'
...
[INFO] Starting generator for input: 'A_Java1_6u23.amelia'
[INFO] Starting generator for input: 'B_FraSCAti.amelia'
[INFO] Starting generator for input: 'C_Server.amelia'
[INFO] Starting generator for input: 'D_Client.amelia'
[INFO] Starting generator for input: 'E_Deployment.amelia'
The dependencies in this sample project are:
B_FraSCAti.amelia ---includes---> A_Java1_6u23.amelia
C_Server.amelia ---depends on---> B_FraSCAti.amelia
D_Client.amelia ---depends on---> B_FraSCAti.amelia
D_Client.amelia ---depends on---> C_Server.amelia
E_Deployment.amelia ---includes---> B_FraSCAti.amelia, C_Server.amelia, D_Client.amelia
I'm sure the problem is including A_Java1_6u23.amelia into B_FraSCAti.amelia, but I don't know why.
If I remove that inclusion, the build succeeds. Also, if I remove the dependencies
C_Server.amelia & D_Client.amelia on B_FraSCAti.amelia, it works.
My questions are:
- Is this happening because I'm doing something wrong (e.g., scoping) or is this a bug?
- Is there a way to order the files before Xtext process them? the problem here, I guess, is that I have to somehow process them in order to compute the order.
[Updated on: Thu, 28 September 2017 21:37] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.45636 seconds