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

Conflict between typetools/stubparser and javaparser/javaparser #6406

Closed
cushon opened this issue Jan 18, 2024 · 3 comments · Fixed by #6408
Closed

Conflict between typetools/stubparser and javaparser/javaparser #6406

cushon opened this issue Jan 18, 2024 · 3 comments · Fixed by #6408
Assignees

Comments

@cushon
Copy link
Contributor

cushon commented Jan 18, 2024

https://github.com/typetools/stubparser is a fork of https://github.com/javaparser/javaparser, and declares code in the same com.github.javaparser package. This means that if a compilation includes both the checker framework, and another annotation processor that depends on javaparser/javaparser, the two versions of those com.github.javaparser classes will conflict.

Would it be technically feasible to rename the packages used by typetools/stubparser to avoid this clash?

@smillst
Copy link
Member

smillst commented Jan 18, 2024

They are renamed in checker.jar when doing a release. But Iooking at the gradle build files that doesn't happen when building the Maven artifacts for a local or SNAPSHOT release. Is that where you are getting the conflict? I can change it so they are always renamed.

@cushon
Copy link
Contributor Author

cushon commented Jan 18, 2024

I wasn't seeing the renaming in checker.jar either, am I missing anything?

$ wget https://checkerframework.org/checker-framework-3.42.0.zip
$ unzip checker-framework-3.42.0.zip
$ jar tf ./checker-framework-3.42.0/checker/dist/checker.jar | grep javaparser

My motivation here was that I was investigating building the Checker Framework with Bazel. Doing the renaming consistently in checker.jar and maven sounds good to me, but mostly I wondered if doing the renaming made sense in general or if it was likely to create an issues.

@smillst
Copy link
Member

smillst commented Jan 18, 2024

Yes, javaparser should be renamed and it at least used to be renamed in checker.jar. It's a bug that it's not. I'll fix that.

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

Successfully merging a pull request may close this issue.

2 participants