Search This Blog

Tuesday, June 10, 2014

Increase conversion time for xtext parsing - Time out error

When dealing with complex Xtext, some times you end up with the below error.
error(10): internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:864): could not even do k=1 for decision 135
Increasing the amount of memory available to the JVM is the first thing you will have to do when dealing with complex grammars. That however doesn't help in this case. That's because this error is due to a timeout inside the ANTLR generator (which converts xtext to antlr) which by default kicks in after 1000ms. After that ANTLR gives up on creating a DFA for your grammar and you may end up with the error message above.

Monday, June 2, 2014

Auto Merging of Git Branches through Jenkins

Two Git branches can be merged and pushed to remote as a part of the build process. This is possible with Jenkins Git plugin with just 2-3 steps configuration. Lets see that in detail.

  • Create/configure a job in Jenkins
  • In Source code management configure the git repository and the integration branch.
    • While merging Test4 branch into Test3 branch; integration branch is Test4 and the Branch to merge to is Test3