-
Notifications
You must be signed in to change notification settings - Fork 69
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
Antlr 4.10 upgrade #2845
Comments
@hs-apotell, third_party/antlr contains your RTTI changes, the latest Antlr is supposed to fix the same + some other speedup |
We cannot have a clone of antlr within Surelog because we use antlr for other parsing in our tool and that creates a conflict. Locally in our fork of Surelog we don't use antlr_fast for that reason. We will have to use a forked version of antlr and that would be a submodule (not a subsystem). Also, I would recommend transferring the ownership of alainmarcel/antlr to chipsalliance. It won't break anything at the moment since nobody is referencing it. Ping me back when that's done (or if you don't wish to transfer) and I shall follow up with the merge. |
The goal is to use upstream antlr, so any submodule will just point to there (and the submodule is just for the convenience of the people who don't want to install a local antlr) We also don't use the Surelog antlr but just link against our local copy of upstream and then link Surelog against that which works well (which is why it is extra exciting to now use that upstream with is already faster than Alains' branch). I think the alainmarcel/antlr was once considered to put to chipsalliance, but it is somewhat outside the scope of chipsalliance so was not accepted. If we all just use the upstream version of Antlr, things will get simpler (also, I am currently involved in getting some patches into Antlr, so there is more continued effort into getting things faster and even less RTTI'ed). |
Using antlr/antlr4 with no modifications is even better. I interpreted @alaindargelas comment as going back to what used to be a local copy of antlr modified for use with Surelog only. If the plan is to use pristine antlr/antlr4 then what's there to merge? We just need to update the entry in .gitmodule to pull the relevant repository and we should be done. What am I missing?? |
Exactly: changing .gitmodule to the upstream antlr and then have one directory with the pre-generated jar file (as that otherwise would require a whole lot more dependencies with maven and stuff). |
@hs-apotell, please submit the PR with the updated .gitmodule, .jar saved under Surelog/third_party/antlr_comp/antlr4-4.10.1-complete.jar and the changes to the Cmake to point to that by default, also remove the antlr_fast directory. |
Running into number of issues -
Open blocker Issues on antlr4 repository - |
The |
Isn't Java8 EOL ? |
@hs-apotell Java 11+ based apps no longer require a JRE installation. Java 11 based apps are supposed to bundle a java implementation into their binary |
Are we pulling in latest or staying with a release commit? I would recommend a release commit but that would mean waiting until the next release. @hzeller @QuantamHD As for the Java releated concern - it seems that CMake picks Java 8 over Java 11, especially if there is no version specification required or only the Runtime is requested. Will need some time to test this and find a working solution. There are still two other issues that are not even reported. I will open related bugs and possibly submit a PR too for antlr4 repository. |
I would track head of antlr4. The development stuff happens in their dev branch, so head is essentially the stable release (including minor fixes they added now). So no need to wait for the next release. Can we CMake tell to use Java11 ? It sounds like a thing that some CMAKE variable will fix. |
Yes, that's what I was doing or at least I thought I was doing. I modified the CMakeLists.txt and set the recommended JAVA_HOME variable. CMake still wouldn't pick the correct Java version (I have multiple version installed on my system). As it turns out, JAVA_HOME needs to be set as environment variable only. Passing it to CMake as a variable assignment i.e. -D option doesn't work. With that resolved, the below is the only blocker. Hopefully, this will get merged soon. |
Looks like antlr/antlr4#3663 is merged. |
Yes. I am off work this week. Will work on this following Monday. |
antlr/antlr4#3663 isn't merged into master yet. Do you want to track a specific commit for now?? |
We should go with the head of dev |
* Deleted local copy of antlr * Added prebuilt antlr tool to third_party/antlr4_bin * Updated .gitmodules to point to pristine antlr4/antlr4 * Update CMakeLists.txt to use the updated antlr4 * Updated workflow to use java 11 P.S. third_party/antlr4 is tracking 'dev' branch and not the 'master' as Surelog is dependent on some of the changes that are not yet released. Will revisit once the changes in dev are merged into master.
* Deleted local copy of antlr * Added prebuilt antlr tool to third_party/antlr4_bin * Updated .gitmodules to point to pristine antlr4/antlr4 * Update CMakeLists.txt to use the updated antlr4 * Updated workflow to use java 11 P.S. third_party/antlr4 is tracking 'dev' branch and not the 'master' as Surelog is dependent on some of the changes that are not yet released. Will revisit once the changes in dev are merged into master.
#2845: Switch to using pristine ANTLR
Fixed by #2886 |
No description provided.
The text was updated successfully, but these errors were encountered: