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

Remove third party libraries from Checker Framework's Maven artifacts. #1739

Closed
smillst opened this issue Jan 3, 2018 · 8 comments
Closed
Assignees
Milestone

Comments

@smillst
Copy link
Member

smillst commented Jan 3, 2018

Because Annotation File Utilities uses Guava and ASM, the checker.jar contains Guava and ASM classes. If the Checker Framework jars are on the processor path rather than the standard classpath, this isn't likely to cause conflicts. (Of course if another annotation processer is used, it could cause conflicts.)

Some users of the Checker Framework add it to the standard classpath. For an example from @ahubold, see the fifth email in this discussion.

So the third party libraries should be removed from the Maven artifacts and should instead be added as Maven dependencies. (Also, framework.jar should be added as an artifact.)

@smillst
Copy link
Member Author

smillst commented Feb 27, 2018

We aren't going to remove them, but rather rename them so the packages start with org.checkerframework. (This will happen for the April 2nd release.)

@smillst
Copy link
Member Author

smillst commented Mar 29, 2018

Fixed via 7a24624.

@smillst smillst closed this as completed Mar 29, 2018
@ahubold
Copy link

ahubold commented Apr 3, 2018

Thank you!

Other third party libraries are still bundled under their original package name, for example org.apache.commons.lang3. Would be nice to apply this fix to all third party libs.

@mernst
Copy link
Member

mernst commented Apr 3, 2018

Reopening because more packages need to be renamed.

@ahubold
Copy link

ahubold commented May 2, 2018

Sorry, but even with release 2.5.1 the checker.jar still contains packages that are third party and should IMHO either be relocated to other packages or declared as maven dependencies. Otherwise accidental version conflicts can easily happen.

There are still packages starting with

  • org.jmlspecs
  • com.sun
  • scenelib
  • sun
  • annotator (okay, this one might be okay, it's from typetools as well?)
  • javax

At least some of these seem to be third party libs that could cause conflicts, right?

@smillst
Copy link
Member Author

smillst commented May 2, 2018

This one we can't rename without changing the way we alias declaration annotations. (It only contains org.jmlspecs.annotation.Pure.)

  • org.jmlspecs

These are from the javac.jar, which can't be renamed or else they don't work properly with javac.

  • com.sun
  • sun
  • javax

These are from typetools/annotation-tools

  • annotator (okay, this one might be okay, it's from typetools as well?)
  • scenelib

@ahubold
Copy link

ahubold commented May 2, 2018

Okay, thank you.

Does this mean that checker.jar just works with a specific version of javac, the one that is bundled?
This could be problematic with Java 9+ because of a a split package for javax.annotation (for a description of the problem see for example https://blog.codefx.org/java/jsr-305-java-9/)

Well, I just saw issue #1224. Maybe this needs to be revisited for Java 9 support.

@smillst
Copy link
Member Author

smillst commented May 2, 2018

The checker.jar works with any version of the Java 8 compiler. Yes, once the Checker Framework supports Java 9+, this will change.

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

No branches or pull requests

3 participants