zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfenes <...@git.apache.org>
Subject [GitHub] zookeeper pull request #490: ZOOKEEPER-3000: Use error-prone compiler
Date Mon, 19 Mar 2018 10:53:03 GMT
Github user mfenes commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/490#discussion_r175393897
  
    --- Diff: build.xml ---
    @@ -475,23 +484,36 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
                         pattern="${ivy.lib}/[artifact]-[revision].[ext]"/>
           <ivy:cachepath pathid="mvn-ant-task-classpath" conf="mvn-ant-task"/>
         </target>
    -    <target name="compile" depends="ivy-retrieve,clover,build-generated">
    -        <javac srcdir="${java.src.dir}" destdir="${build.classes}" includeantruntime="false"
    +    <target name="compile" depends="ivy-retrieve,clover,build-generated,ivy-retrieve-error_prone">
    +        <javac compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"
    +               srcdir="${java.src.dir}" destdir="${build.classes}" includeantruntime="false"
                    target="${javac.target}" source="${javac.source}" debug="on" encoding="${build.encoding}">
    +            <compilerclasspath>
    +              <pathelement location="${ivy.error_prone.lib}/error_prone_ant-${error_prone.version}.jar"/>
    +            </compilerclasspath>
                 <classpath refid="java.classpath"/>
                 <compilerarg value="-Xlint:all"/>
                 <compilerarg value="-Xlint:-path"/>
    +
             </javac>
         </target>
     
    -    <target name="compile-test" depends="ivy-retrieve-test,compile">
    +    <target name="compile-test" depends="ivy-retrieve-test,compile,ivy-retrieve-error_prone">
    --- End diff --
    
    Could we add the error prone compiler as an optional tool, so that similarly to e.g. code
coverage tools, the build could be run with or without the tool?


---

Mime
View raw message