-
Notifications
You must be signed in to change notification settings - Fork 0
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
Don't depend on jsr308-langtools #7
base: master
Are you sure you want to change the base?
Conversation
@zhangjiangqige Can you have a look at this? |
Yes sure. |
It looks like that the class However I don't know why is this happening... The static/singleton member @wmdietl Do we need to investigate |
I tried several combinations and found that:
So it seems that Therefore, we probably need to find a jar that:
and put it in the bootclasspath... |
Probably related issue: facebook/buck#1781 I tried creating a jar containing only As for the root cause, I still can't figure it out. It's like that the entire memory space is cleared when compiling if As for CheckerMain, it actually puts errorprone in its bootclasspath if it's JVM 8. And the reason why putting errorprone in this bootclasspath doesn't cause any problem is probably that eventually the errorprone javac is launched as a new process and there aren't many things for it to "interfere". I'm suspecting that all static members of classes outside of javac in this case are also cleared, though I haven't verified this idea yet. |
Somehow in eisop, different classloaders are used for loading classes before and during the "compilation". This can be seen by adding In eisop,
and in typetools,
The classloaders used for loading InferenceMain before javac.compile is called and during its execution are clearly different in eisop, and I think this explains the phenomenon "cleared memory space" as the same "class instance" of InferenceMain accessed are actually from two classloaders and thus have different memory space. |
I saw this issue referenced from facebook/buck#1781. I'm not sure what is going on but these instructions on how we integrated Error Prone for Buck builds may be useful: https://github.com/uber/okbuck/wiki/Using-Error-Prone-with-Buck-and-OkBuck |
Thanks for the info! That script for creating the tiny jar is really useful. |
I tried the classloader magic from bazel in https://github.com/zhangjiangqige/checker-framework-inference/commit/394ffd36da4db105131c7329596f9e537bab53e2 and it now can succeed with the whole javac.jar in bcp. But this probably seems too magical. |
…ence into fix-scripts
… into fix-scripts
@zhangjiangqige Thanks for getting this to work! Please make a PR with these changes against typetools. |
No description provided.