https://bz.apache.org/bugzilla/show_bug.cgi?id=57983

            Bug ID: 57983
           Summary: No way to disable partial compilation from
                    CompilerAdapter
           Product: Ant
           Version: unspecified
          Hardware: PC
                OS: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
          Assignee: [email protected]
          Reporter: [email protected]

I'm working on a task which compiles Kotlin code (kotlinlang.org). Kotlin code
is supposed to be mixed with Java code, so the task is a CompilerAdapter
implementation which calls Kotlin compiler and then javac.

The problem is, the standard mechanism of partial/incremental compilation in
Ant doesn't quite work with Kotlin at all. I'm looking at
org.apache.tools.ant.taskdefs.Javac#scanDir, where a SourceFileScanner instance
is created with a glob pattern *.kt -> *.class (assuming my adapter's
getSupportedFileExtensions() returns array with "kt" in it). This results in
compilation of only those source files which are newer than the class files
with the corresponding name. But in fact, class file names have nothing to do
with source file names (imagine A.kt having class B and B.kt having class A).
Partial compilation is not an easy task for Kotlin projects, also because we
can have a class file which is produced from multiple source files.

So I'm looking for ways to disable this behaviour altogether and always compile
all sources (both Java and Kotlin), because otherwise the task cannot be used
reliably. Currently I see no workaround.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to