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

Latest version 1.17 released in Nov '21 uses Antlr 4.9.1? #518

Closed
kaby76 opened this issue Apr 3, 2022 · 11 comments
Closed

Latest version 1.17 released in Nov '21 uses Antlr 4.9.1? #518

kaby76 opened this issue Apr 3, 2022 · 11 comments
Milestone

Comments

@kaby76
Copy link

kaby76 commented Apr 3, 2022

I don't use Intellij ....... IDEA IDE that often (as the file chooser takes 5 minutes to open any file because JetBrains decided to not implement a lazy evaluation file chooser and instead reads my entire 1TB file system to construct a file system tree--JFC), but I decided I needed to use it to reproduce an error in this StackOverflow question. I am using 2021.3 Community IntellijIDEA, and the ANTLR Intellij plugin 1.17.

The Intellij plugin was released in November 2021. It apparently happened in November '21, and it seems appropriate that it should use the latest release of Antlr, version 4.9.3.

When I go to verify the versions in the UI and the version tag in the generated parser/lexer files, I find out these lovelies:

  • In the main IDE for Intellij, open the "Settings" box (menu "File -> Settings". In the far LHS panel, select "Plugins". In the middle panel where it says "Type / to see options", type antlr. In the RHS panel, notice that it says: "This plugin is for ANTLR v4 grammars and includes ANTLR 4.9.1".
  • When I go to "Generate ANTLR grammar", the generated parser and lexer are indeed marked up with a comment at the top that says 4.9.1 was used to generate the Java source code.
  • When I go to "Configure ANTLR...", it opens the "Configure ANTLR Tool 4.9.2 for Simple.g4".

I'm not a QAer, because I believe a developer should actually test his work, but this is just terrible. The Antlr version numbers are inconsistent, and it doesn't even use the latest version of Antlr 4.9.3 released in November '21.

@parrt
Copy link
Member

parrt commented Apr 6, 2022

Will be updating to 4.10 soon...thanks!

@parrt parrt added this to the 1.18 milestone Apr 6, 2022
@parrt
Copy link
Member

parrt commented Apr 8, 2022

Screen Shot 2022-04-08 at 12 21 51 PM

@KvanTTT
Copy link
Member

KvanTTT commented Apr 8, 2022

I guess we should update https://github.com/antlr/intellij-plugin-v4/blob/master/src/main/antlr/org/antlr/intellij/plugin/parser/ANTLRv4Parser.g4 grammar before publishing the plugin to support options for lexer rules.

@KvanTTT
Copy link
Member

KvanTTT commented Apr 8, 2022

Also, we have to regenerate lexer and parser with the new version of ANTLR.

@parrt
Copy link
Member

parrt commented Apr 8, 2022

Does this look right @KvanTTT ? #524

@parrt
Copy link
Member

parrt commented Apr 8, 2022

@KvanTTT There is an example of the danger faced with big refactorings. a method used by the plugin is no longer available in 4.10: targetExists(). Not sure when it was dropped, but I made a simple version and put it into the plug in directly.

parrt added a commit to parrt/intellij-plugin-v4 that referenced this issue Apr 8, 2022
@KvanTTT
Copy link
Member

KvanTTT commented Apr 8, 2022

Does this look right @KvanTTT ? #524

Yes, looks good!

There is an example of the danger faced with big refactorings. a method used by the plugin is no longer available in 4.10: targetExists(). Not sure when it was dropped, but I made a simple version and put it into the plug in directly.

Agree, but the plugin is tightly related to ANTLR tool. It was removed once by me. It's possible to restore the method but I'm not sure it makes sense since you've already written a new one.

@parrt
Copy link
Member

parrt commented Apr 9, 2022

Yeah, No big deal. it's all working now. I'm a bit nervous about requiring a fairly recent intellij, but maybe I will allow earlier versions and people can just try it to see if it works. no point in forcibly restricting earlier versions.

@parrt parrt closed this as completed in 29a9c11 Apr 9, 2022
@bjansen
Copy link
Collaborator

bjansen commented Apr 23, 2022

As of today, versions 2018.x and 2019.x are barely used compared to other more recent versions, according to plugin download stats:

Plugin version 2018.x 2019.x 2020.x 2021 / 2022
1.17 (nov 4)  147 1146  3932  28734
1.18 (apr 19) n/a 21 102 651 / 1987

@parrt
Copy link
Member

parrt commented Apr 23, 2022

Ok, I'm testing it with a minimum of IC-2020.2.1 because that's the version that fixed an OS X Monterey error about a missing Library. But, I'm allowing any build sense 2019.2 in the plugin.xml in case that works for somebody.

@parrt
Copy link
Member

parrt commented Apr 23, 2022

@bjansen Now that 4.10.1 is out I'm working on fixing the plug-in

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

No branches or pull requests

4 participants