RFR: 8294368: Java incremental builds broken on Windows after JDK-8293116
Jorn Vernee
jvernee at openjdk.org
Tue Oct 4 17:33:05 UTC 2022
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.
-------------
Commit messages:
- review comments
- tweak comment in fixpath
- fix windows incremental builds
Changes: https://git.openjdk.org/jdk/pull/10560/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10560&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8294368
Stats: 47 lines in 4 files changed: 39 ins; 0 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/10560.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10560/head:pull/10560
PR: https://git.openjdk.org/jdk/pull/10560
More information about the compiler-dev
mailing list