-
Notifications
You must be signed in to change notification settings - Fork 8
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
Timeout in AspectProcessor.injectDispatchInParentAspects when the maven plugin is used #70
Comments
Mmh maybe xtend when run in the Eclipse IDE is doing some job in parallel and doesn't in maven... we don't have much control over the order in which xtend do the processing of xtend files and its active annotations. do you have some small example that you can archive in order to reproduce the issue? |
timeout-error-k3-master.zip And the problem is visible here: https://travis-ci.org/lmouline/timeout-error-k3/jobs/498801812#L1820 |
I've recently looked into this issue. Apparently in maven, the xtend compilation isn't parallel, so the order in which it takes into account the *.xtend files is important. And this problem mainly occurs because the K3 aspect are split in many individual xtend files instead of one big xtend file (BTW I think that splitting in individual files is a good practice. We do need to support it correctly...) The timeout occurs because the k3 annotation tries to inject the dispatch code for a child class in the parent class. But the parent class hasn't been generated yet, so it waits for it and fail. One solution would be to make sure the xtend compilation process the code generation in a specific order (parent first, then childs). However, I haven't seen a simple way to achieve that using xtend API. |
When I use the maven plugin, I got some timeout errors in
AspectProcessor.injectDispatchInParentAspects
method. More precisely, when the processor is waiting the generation of a parent class (cf. Aspect.xtend#L882). Dispatch methods in some of my parent classes do not consider some of child classes.I don't have any problem while executing the code using the Eclipse build system: dispatch methods in parent classes are well generated.
I tried to execute the maven build in multi-thread, but the problem is still there.
I also tried to put a waiting loop in the writing method (
Helper.writeContentsIfNew
) but it didn't fix the problem.The text was updated successfully, but these errors were encountered: