Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [acceleo] Standalone compiler (ant task)
[acceleo] Standalone compiler (ant task) [message #1798727] Fri, 23 November 2018 10:38 Go to next message
Shimon Zadok is currently offline Shimon ZadokFriend
Messages: 24
Registered: May 2016
Junior Member
Hi Guys,

So I saw that from 3.7.1 'AcceleoCompiler' was removed by 'Laurent Goubet'. He believes it to be broken, that 'AcceleoCompiler' is an ant task.

https://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/commit/?h=3.7.2RC1&id=0388cc9e0a93714409cd510270633da4792302df

That is not a big of a deal and I refactored my implementation and extended Task.
My issue is my source is still using AcceleoCompilerHelper which is stated as '@Deprecated' and that would be less comfortable if it is planned to be removed as well.

I hope that 'Laurent Goubet' is seeing this and can help me.
Re: [acceleo] Standalone compiler (ant task) [message #1798730 is a reply to message #1798727] Fri, 23 November 2018 11:14 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I think you are saying that you found a workaround so that you could continue to use Ant. I recommend that you migrate away from Ant to something like MWE2.

If you really need AcceleoCompilerHelper then you can raise a Bugzilla to the effect that it should not be deprecated. You can certainly raise a Bugzilla since the @Deprecated has no @deprecated Javadoc identifying a replacement functionality.

Regards

Ed Willink
Re: [acceleo] Standalone compiler (ant task) [message #1798735 is a reply to message #1798730] Fri, 23 November 2018 12:09 Go to previous messageGo to next message
Shimon Zadok is currently offline Shimon ZadokFriend
Messages: 24
Registered: May 2016
Junior Member
Do you mean that: https://www.eclipse.org/Xtext/documentation/306_mwe2.html ?
Done https://bugs.eclipse.org/bugs/show_bug.cgi?id=541497,

Thanks
Re: [acceleo] Standalone compiler (ant task) [message #1798737 is a reply to message #1798735] Fri, 23 November 2018 12:22 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Yes. When working within Eclipse, MWE2 integrates well, Ant is a nightmare; the developers of EMF, UML2 and OCL would all like to terminate support since the perception is that the time spent maintaining Ant tasks far exceeds the benefit to ? any users.

If you are using Ant beyond Eclipse then there may be some point struggling but don't count on Ant tasks remaining supported.

Regards

Ed Willink
Re: [acceleo] Standalone compiler (ant task) [message #1799966 is a reply to message #1798737] Tue, 18 December 2018 07:56 Go to previous messageGo to next message
Michael Voigt is currently offline Michael VoigtFriend
Messages: 3
Registered: October 2018
Junior Member
Hi guys,

we've run into the same problem. Our goal is to compile the .mtl files to .emtl during build time with gradle, i.e. without Eclipse. What is the recommended approach for this if AcceleoCompiler(Helper) is deprecated/removed?

Thanks a lot!
Michael
Re: [acceleo] Standalone compiler (ant task) [message #1799975 is a reply to message #1799966] Tue, 18 December 2018 09:33 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you really want to work truly standalone, just copy the relevant parts of the Acceleo/Ant/Eclipse functionality to your own classes.

And post the result here so that others can share. If it makes sense as a general contribution, please raise a Bugzilla. If contributing, please make sure you know the authors of all lines of your contribution and that all authors are happy to contribute under the EPL 2.0 license. You may copy Eclipse, but not Oracle code.

Regards

Ed Willink
Re: [acceleo] Standalone compiler (ant task) [message #1800854 is a reply to message #1799975] Wed, 09 January 2019 07:21 Go to previous messageGo to next message
lea ilagan is currently offline lea ilaganFriend
Messages: 59
Registered: October 2012
Member
Hello Guys,

We're facing the same problem and still looking for any recommendation to compile mtl to emtl files via headless?
Please advise.

Thanks,
Lea

[Updated on: Wed, 09 January 2019 07:24]

Report message to a moderator

Re: [acceleo] Standalone compiler (ant task) [message #1801146 is a reply to message #1798727] Mon, 14 January 2019 15:34 Go to previous messageGo to next message
Che Bumagat is currently offline Che BumagatFriend
Messages: 46
Registered: February 2012
Member
Did anyone encounter this error in ACCELEO? We are using Eclipse Photon with Acceleo 3.7 and building using ANT.

Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
at java.util.HashMap$ValueIterator.next(HashMap.java:1471)
at org.eclipse.acceleo.common.internal.utils.AcceleoPackageRegistry$AcceleoMultipleIterator.next(AcceleoPackageRegistry.java:677)
at org.eclipse.ocl.ecore.EcoreEnvironment.findPackage(EcoreEnvironment.java:650)
at org.eclipse.ocl.ecore.EcoreEnvironment.findPackageWithStrategy(EcoreEnvironment.java:442)
at org.eclipse.ocl.ecore.EcoreEnvironment.lookupClassifier(EcoreEnvironment.java:406)

I saw the AcceleoCompiler was deprecated, i just wanted to know if any of you ran into this problem and did you have any solution?

Thanks!
Re: [acceleo] Standalone compiler (ant task) [message #1801152 is a reply to message #1801146] Mon, 14 January 2019 16:54 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

CMEs are generally an embarrassing programming bug. Sometimes they are intermittent which can make debugging harder. For my code, I take the simple view that if a CME ever shows up, in the absence of a 'proof' that it cannot happen again, I recode the iteration to be CME proof.

Recoding is probably not an option for you. But you might be able to warm up the AcceleoPackageRegistry in your own startup code so that when the vulnerable AcceleoPackageRegistry iteration occurs, the CME doesn't.

Regards

Ed Willink
Re: [acceleo] Standalone compiler (ant task) [message #1809980 is a reply to message #1801152] Fri, 26 July 2019 22:12 Go to previous messageGo to next message
Che Bumagat is currently offline Che BumagatFriend
Messages: 46
Registered: February 2012
Member
Thanks Ed!

We created a custom builder code that uses the internal AcceleoParser, similar to what Maven was using but we run it thru ANT.

We have a case where we have a template (e.g. main.mtl) that calls other templates in the same plugin project. Also, it has references to other plugin projects that have common templates for common utility functions.

Not sure how the AcceleoPackageRegistry should behave during compile time, but it looks like this Map is running on several threads and the iterator trying to access the same information.

Is it bad to have so many calls to templates from inside a template? Because we do have other templates that does the same thing and it compiles successfully.

Another thing we observed was we have an empty template that is being called from inside the main.mtl and the empty template still fails to compile.
We got the same CME error.

Appreciate any help or advice. Thanks!
Re: [acceleo] Standalone compiler (ant task) [message #1809982 is a reply to message #1809980] Sat, 27 July 2019 04:51 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

EMF is not threadsafe, although with care applications can use multiple threads. I would very much doubt that Acceleo is threadsafe, so what you describe is very bad. So bad that I suspect you have been deceived. Perhaps a builder has chipped in to add a new thread while you were debugging an old thread.

Regards

Ed Willink
Previous Topic:Specify folder for resolving dsl model files?
Next Topic:[Acceleo] Loop over empty OrderedSet creates empty lines
Goto Forum:
  


Current Time: Sat Apr 20 11:06:19 GMT 2024

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

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

Back to the top