Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong weaving due to Xtend not consistently returning JvmDeclaredType after k3 annotation processing #123

Closed
dvojtise opened this issue Aug 13, 2018 · 0 comments
Labels

Comments

@dvojtise
Copy link
Contributor

dvojtise commented Aug 13, 2018

With the current K3 annotationProcessor (for an unknown reason) I can reproduce a code generation error in Melange (in the generated adapter code)

After investigation, it appears that:
in the weaveBuilder, Melange gets the JvmDeclaredType from xtend ( WeaveBuilder.xtend#L63)

However, depending on how melange is called, this JvmDeclaredType does not have the same content for a given aspect.

(On my configuration: GEMOC + latest K3 (2018-08-10) + melange in dev workspace, then GEMOC legacyFSM example)
If called due to an editor opening event (for the outline of the melange file) then it returns the java class processed by k3 annotation processor (static method, 1st parameter for self)
If called by "generate interfaces" command, the the JvmDeclaredType corresponds to the class before being processed by K3 (ie. not static, no self as 1st parameter)

then in AspectToEcore.xtend, as it assumes that the file has been processed by K3, it generates a wrong signature for the methods. Leading to wrong modeltype ecore generation and other java errors in the adapters (unimplemented abstract methods, wrong override, ...)

This issue looks similar to previous symptom we observed with non consistent behavior of melange generation (opening or closing the editor helped in having correct code) but without a way to reproduce it systematically for debug. (for ex: #107, #100, #75)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant