HongYi Chen created KAFKA-19786:
-----------------------------------

             Summary: Session mode compileScala reports missing classes java 
main directory
                 Key: KAFKA-19786
                 URL: https://issues.apache.org/jira/browse/KAFKA-19786
             Project: Kafka
          Issue Type: Bug
          Components: build
    Affects Versions: 4.1.0
            Reporter: HongYi Chen
            Assignee: HongYi Chen


*Problem*
When running `{{{}:core:compileScala{}}}` under 
{{{}`keepAliveMode=SESSION`{}}}, joint compilation adds a non-existent 
directory ({{{}.../core/build/classes/java/main{}}}) to {{{}javac{}}}’s 
classpath.
This triggers:
```
Unexpected javac output: warning: [path] bad path element 
".../core/build/classes/java/main": no such file or directory
error: warnings found and -Werror specified
```
The same task succeeds under `{{{}keepAliveMode=DAEMON`{}}}.



*Current Workaround*
Added a scoped compiler flag `({{{}-Xlint:-path{}}})` only under 
`{{{}keepAliveMode=SESSION`{}}} to suppress the {{[path]}} warning and allow 
the build to succeed.


*Steps to Reproduce*

```
./gradlew clean :core:compileScala -PkeepAliveMode=session   # fails before 
workaround  
./gradlew clean :core:compileScala -PkeepAliveMode=daemon    # succeeds  
```

*Goal of This Ticket*
Identify why SESSION-mode joint compilation includes the missing 
{{classes/java/main}} entry in {{{}javac{}}}’s classpath, align its behavior 
with DAEMON mode, and remove the temporary suppression once the classpath is 
corrected.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to