eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
382 stars 143 forks source link

Upgrade antlr to version 4.x #22638

Open m0mus opened 5 years ago

bshannon commented 5 years ago

We got a special exemption to allow us to use Antlr 2.x for Eclipse GlassFish 5.1, but we need to upgrade to Antlr 3.x or newer for the subsequent release. Antlr is used by the old EJB CMP support.

oasuncion commented 5 years ago

Hello, I can see that this ticket was flagged 'help wanted' last November, let me know if I can help on this. BR

bshannon commented 5 years ago

As far as I know, no one is working on this, so yes, we still need help. Thanks!

oasuncion commented 5 years ago

Ok, in this case I will have a look. I will try to update to the last antlr available version (4.7.2), identify and update the impacted areas and perform some non-regression testings. Any insight is appreciated (I am new to GlassFish and Antlr). BR

oasuncion commented 5 years ago

Hi, I did a test, upgrading the antlr dependency to 4.7.2. I could update the grammar files taking into account the new syntax for parser/lexer definitions in Antlr 4, this part is fine. The problem I am facing now is related to the Java code written in these files, intended to be part of the generated code. Changes between Antlr 2.x and 4.x are huge, most of this code doesn't compile anymore and it is often hard for me to see how to properly upgrade it as I am missing the initial intend of the code. It would be better to have this ticket handled by someone with a knowledge of the initial work and of Antlr 4, so he may have a better idea of which part of code is not relevant anymore, which is still relevant, and in this case how to upgrade it.

bshannon commented 5 years ago

If only we had such a person!

All the people who did this work initially are gone. We no longer have anyone who has a deep understanding of this code. Someone is going to need to learn enough about this code to understand how to change it.

smillidge commented 5 years ago

Most of the antlr usage is in old cmp code. Do we still want that code? Is there anybody still using it?

bshannon commented 5 years ago

It's still required so that we have a complete implementation of all required and optional Java EE / Jakarta EE APIs.

github-actions[bot] commented 4 years ago

This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment

pzygielo commented 4 years ago

It's still at 2x: https://github.com/eclipse-ee4j/glassfish/blob/e0a2a1f1fb67178d17b336aca2683706ad56d889/nucleus/parent/pom.xml#L144

arjantijms commented 4 years ago

We probably want to make sure CMP gets actually pruned/removed instead of just made optional.

github-actions[bot] commented 3 years ago

This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment

pzygielo commented 3 years ago

It's still at 2x: https://github.com/eclipse-ee4j/glassfish/blob/4bb0183eb68f1dea570ad46ebe3e651a2bb6c0de/nucleus/parent/pom.xml#L143

github-actions[bot] commented 2 years ago

This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment

pzygielo commented 2 years ago

It's still at 2x: https://github.com/eclipse-ee4j/glassfish/blob/877da9d05c4f2a0c90b3c243832b528c4ccefc28/nucleus/parent/pom.xml#L142

arjantijms commented 2 years ago

Following EE 10 we may want to finally prune this?

avpinchuk commented 1 year ago

Is it still relevant?

arjantijms commented 1 year ago

It's sort of relevant in the sense there's still no real outcome here. Antlr is still at 2.x, but CMP also still hasn't been pruned.

avpinchuk commented 1 year ago

@arjantijms, I think it's possible upgrade antlr2 to latest version of antlr3 3.5.3. Is it make sense?

dmatej commented 1 year ago

It is relevant, and the problem is that you have to change sources, because version 3 and 4 changed some things, they are not compatible. I did it for another project some time ago, but I did not have time to do that here yet.

avpinchuk commented 1 year ago

@dmatej, I have estimated the amount of work and will try to do it in a some reasonable time. Antlr3 requires less changes, because they supports AST, antlr4 not.

github-actions[bot] commented 4 months ago

This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment