Integrated: 8294368: Java incremental builds broken on Windows after JDK-8293116

Jorn Vernee jvernee at openjdk.org
Wed Oct 5 10:29:30 UTC 2022


On Tue, 4 Oct 2022 16:19:24 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> This patch fixes incremental builds on Windows.
> 
> There are 2 parts to this:
> 1. the build system needs to run the paths in the modified file list through fixpath. I've added a `convert` mode to `fixpath.sh` for that. There's an extra target for generating the file with fixed paths. On non-windows platforms this is just a simple `cp` of the file.
> 2. the dependency plugin of `javac` was using string-based path comparison. But, the paths fed by the build system and the paths used internally by javac could be in slightly different formats, meaning that files were not detected properly as changed. I switched to `Path`-based comparison instead and that fixes the issue.
> 
> Testing:
> tested this manually by doing the following:
> 1. `make clean`
> 2. `make images`
> 3. put garbage in one of the files in `java.base`
> 4. `make images` (incremental)
> 5. verify that the build reported an error
> 6. verify the contents of `<build>\jdk\modules\java.base_the.java.base_batch.modfiles.fixed`
> 7. revert the changes of 3, and do the same for another file
> 8. `make images` (incremental)
> 9. verify that the build reported an error
> 10. verify the contents of `<build>\jdk\modules\java.base_the.java.base_batch.modfiles.fixed`
> 11. remove garbage from file modified by 9 again
> 12. `make images` (incremental)
> 13. verify that build succeeds as in 2
> 
> I've tested the build on Windows and Linux (WSL) using the above steps.

This pull request has now been integrated.

Changeset: 8ebebbce
Author:    Jorn Vernee <jvernee at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/8ebebbce32c7021cc0983dece4bb2644c79e64aa
Stats:     47 lines in 4 files changed: 39 ins; 0 del; 8 mod

8294368: Java incremental builds broken on Windows after JDK-8293116

Reviewed-by: erikj, djelinski, jlahoda

-------------

PR: https://git.openjdk.org/jdk/pull/10560


More information about the compiler-dev mailing list