-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Add Javac compile option as an alternative to Zinc #5743
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Chris.
logger = logging.getLogger(__name__) | ||
|
||
|
||
class JvmCompileSubsystem(Subsystem): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this option could probably go on src/python/pants/backend/jvm/subsystems/jvm_platform.py
instead as --jvm-platform-compiler
?
@@ -101,6 +102,31 @@ python_library( | |||
sources = ['anonymizer.py'], | |||
) | |||
|
|||
python_library( | |||
name = 'javac', | |||
sources = globs('javac/*.py'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The convention in this file of defining targets outside of their directory is unfortunate... would recommend defining this target in that directory instead.
Oh... one or two integration tests (or a decorator that allows marking a test as run with both |
Chris and I discussed landing this now in order to ensure that #4729 doesn't break anything, and then making the remaining fixes later in the week. |
Problem
Zinc doesn't run on Java 9 or Java 10.
Solution
Provide the option to use Javac for java compilation instead of Zinc.
Result
This is first pass which is meant for discussion. I haven't updated tests or documentation, mainly just want to get feedback on what is there, and if the general pattern of using the subsystem is how we want to go.
It should be noted that there is no code analysis with Javac so any tasks that use analysis won't work.
To test it on the branch you need to add
to pants.ini