From 6efb5d57a05d835b8d6f2401bdbb34db97afd572 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Fri, 30 Aug 2024 15:37:57 -0400 Subject: [PATCH 01/17] Use rm -rf to remove bin folder --- checker/tests/nullness-extra/issue265/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/checker/tests/nullness-extra/issue265/Makefile b/checker/tests/nullness-extra/issue265/Makefile index 117806bff93..aafacf9ecd2 100644 --- a/checker/tests/nullness-extra/issue265/Makefile +++ b/checker/tests/nullness-extra/issue265/Makefile @@ -6,5 +6,4 @@ all: $(JAVAC) -processor org.checkerframework.checker.nullness.NullnessChecker Delta.java -cp bin/ -d bin/ clean: - rm bin/*.class - rmdir bin + rm -rf bin From 0ad270e4400bb7db5379c7ff1d9bc844f3ca7223 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Fri, 30 Aug 2024 15:38:49 -0400 Subject: [PATCH 02/17] Also test clean task in CI --- checker/bin-devel/test-cftests-junit-jdk21.sh | 3 +++ checker/bin-devel/test-cftests-junit.sh | 3 +++ checker/bin-devel/test-cftests-nonjunit.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/checker/bin-devel/test-cftests-junit-jdk21.sh b/checker/bin-devel/test-cftests-junit-jdk21.sh index c3785231301..57d02eff296 100755 --- a/checker/bin-devel/test-cftests-junit-jdk21.sh +++ b/checker/bin-devel/test-cftests-junit-jdk21.sh @@ -14,3 +14,6 @@ source "$SCRIPTDIR"/clone-related.sh # Adding --max-workers=1 to avoid random failures in Github Actions. An alternative solution is to use --no-build-cache. # https://github.com/eisop/checker-framework/issues/849 ./gradlew test -x javadoc -x allJavadoc --console=plain --warning-mode=all --max-workers=1 + +# Test clean task +./gradlew clean diff --git a/checker/bin-devel/test-cftests-junit.sh b/checker/bin-devel/test-cftests-junit.sh index eaf78761af0..f11dfa44b6e 100755 --- a/checker/bin-devel/test-cftests-junit.sh +++ b/checker/bin-devel/test-cftests-junit.sh @@ -13,3 +13,6 @@ source "$SCRIPTDIR"/clone-related.sh # Adding --max-workers=1 to avoid random failures in Github Actions. An alternative solution is to use --no-build-cache. # https://github.com/eisop/checker-framework/issues/849 ./gradlew test -x javadoc -x allJavadoc --console=plain --warning-mode=all --max-workers=1 + +# Test clean task +./gradlew clean diff --git a/checker/bin-devel/test-cftests-nonjunit.sh b/checker/bin-devel/test-cftests-nonjunit.sh index 55667f55a0c..ed2711a1f9a 100755 --- a/checker/bin-devel/test-cftests-nonjunit.sh +++ b/checker/bin-devel/test-cftests-nonjunit.sh @@ -17,3 +17,6 @@ source "$SCRIPTDIR"/clone-related.sh # Moved example-tests out of all tests because it fails in # the release script because the newest maven artifacts are not published yet. ./gradlew :checker:exampleTests -x javadoc -x allJavadoc --console=plain --warning-mode=all + +# Test clean task +./gradlew clean From 9989d4d616c64181ae83e28092a1f6257c2829ed Mon Sep 17 00:00:00 2001 From: Werner Dietl Date: Fri, 30 Aug 2024 17:02:08 -0400 Subject: [PATCH 03/17] Run `clean` twice --- checker/bin-devel/test-cftests-junit.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/checker/bin-devel/test-cftests-junit.sh b/checker/bin-devel/test-cftests-junit.sh index f11dfa44b6e..bd4d3884ec5 100755 --- a/checker/bin-devel/test-cftests-junit.sh +++ b/checker/bin-devel/test-cftests-junit.sh @@ -16,3 +16,4 @@ source "$SCRIPTDIR"/clone-related.sh # Test clean task ./gradlew clean +./gradlew clean From 3aba70735cfb704802c1ade98d1e4ecbffc1b745 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Fri, 30 Aug 2024 17:06:07 -0400 Subject: [PATCH 04/17] Print out stacktrace and debug for windows --- checker/bin-devel/test-cftests-junit-jdk21.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checker/bin-devel/test-cftests-junit-jdk21.sh b/checker/bin-devel/test-cftests-junit-jdk21.sh index 57d02eff296..a5531259e0d 100755 --- a/checker/bin-devel/test-cftests-junit-jdk21.sh +++ b/checker/bin-devel/test-cftests-junit-jdk21.sh @@ -16,4 +16,4 @@ source "$SCRIPTDIR"/clone-related.sh ./gradlew test -x javadoc -x allJavadoc --console=plain --warning-mode=all --max-workers=1 # Test clean task -./gradlew clean +./gradlew clean --stacktrace --info From d47b934cfece78ea0f23ca750afeb587bb99b714 Mon Sep 17 00:00:00 2001 From: Aosen Xiong <82676488+Ao-senXiong@users.noreply.github.com> Date: Fri, 30 Aug 2024 18:33:00 -0400 Subject: [PATCH 05/17] Clean twice for junit test Co-authored-by: Werner Dietl --- checker/bin-devel/test-cftests-junit.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/checker/bin-devel/test-cftests-junit.sh b/checker/bin-devel/test-cftests-junit.sh index bd4d3884ec5..8f174e4e731 100755 --- a/checker/bin-devel/test-cftests-junit.sh +++ b/checker/bin-devel/test-cftests-junit.sh @@ -17,3 +17,4 @@ source "$SCRIPTDIR"/clone-related.sh # Test clean task ./gradlew clean ./gradlew clean +./gradlew clean From 39b8db62e4f2737ca0525fb8d5cf1e0fb88cdd21 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Fri, 30 Aug 2024 18:36:05 -0400 Subject: [PATCH 06/17] Bazelisk isn't required for cleaning --- docs/examples/BazelExample/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/BazelExample/Makefile b/docs/examples/BazelExample/Makefile index 8e124e1aba3..ede061d1c46 100644 --- a/docs/examples/BazelExample/Makefile +++ b/docs/examples/BazelExample/Makefile @@ -5,5 +5,5 @@ all: grep -qF "BazelExample.java:25: error: [assignment.type.incompatible] incompatible types in assignment." Out.txt || (echo "FAILURE. Here is file Out.txt:" && cat Out.txt && echo "End of file Out.txt." && false) clean: - bazelisk clean + -bazelisk clean rm -f Out.txt From 17b2897b68fd2a2cd93c63d05356dce145465816 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Fri, 30 Aug 2024 19:59:53 -0400 Subject: [PATCH 07/17] Ignore error in clean task for fixing windows failure --- docs/examples/lombok/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/lombok/Makefile b/docs/examples/lombok/Makefile index fad2c712390..3cd6a335b59 100644 --- a/docs/examples/lombok/Makefile +++ b/docs/examples/lombok/Makefile @@ -18,5 +18,5 @@ all: endif clean: - ../../../gradlew clean + - ../../../gradlew clean rm -f Out.txt From 90140547ef68858c61fbb421d7b141d7b79a8aec Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Sat, 31 Aug 2024 08:50:07 -0400 Subject: [PATCH 08/17] Don't test clean on Junit-JDK21 --- checker/bin-devel/test-cftests-junit-jdk21.sh | 3 --- docs/examples/lombok/Makefile | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/checker/bin-devel/test-cftests-junit-jdk21.sh b/checker/bin-devel/test-cftests-junit-jdk21.sh index a5531259e0d..c3785231301 100755 --- a/checker/bin-devel/test-cftests-junit-jdk21.sh +++ b/checker/bin-devel/test-cftests-junit-jdk21.sh @@ -14,6 +14,3 @@ source "$SCRIPTDIR"/clone-related.sh # Adding --max-workers=1 to avoid random failures in Github Actions. An alternative solution is to use --no-build-cache. # https://github.com/eisop/checker-framework/issues/849 ./gradlew test -x javadoc -x allJavadoc --console=plain --warning-mode=all --max-workers=1 - -# Test clean task -./gradlew clean --stacktrace --info diff --git a/docs/examples/lombok/Makefile b/docs/examples/lombok/Makefile index 3cd6a335b59..4ef28af6b0a 100644 --- a/docs/examples/lombok/Makefile +++ b/docs/examples/lombok/Makefile @@ -15,8 +15,7 @@ all: && grep -qF "Foo.java:12: error: [assignment.type.incompatible] incompatible types in assignment." Out.txt \ && grep -qF "y = null; // error" Out.txt) \ || (echo "===== start of Out.txt =====" && cat Out.txt && echo "===== end of Out.txt =====" && false) -endif - clean: - - ../../../gradlew clean + ../../../gradlew clean rm -f Out.txt +endif From cd35413345d81490653279867181f45d6c922422 Mon Sep 17 00:00:00 2001 From: Aosen Xiong <82676488+Ao-senXiong@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:51:10 -0400 Subject: [PATCH 09/17] Update docs/examples/lombok/Makefile --- docs/examples/lombok/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/lombok/Makefile b/docs/examples/lombok/Makefile index 4ef28af6b0a..31180a82ddd 100644 --- a/docs/examples/lombok/Makefile +++ b/docs/examples/lombok/Makefile @@ -16,6 +16,6 @@ all: && grep -qF "y = null; // error" Out.txt) \ || (echo "===== start of Out.txt =====" && cat Out.txt && echo "===== end of Out.txt =====" && false) clean: - ../../../gradlew clean + ../../../gradlew clean rm -f Out.txt endif From a7f4acacda2374714a6f009d11b1fca2c9ac880c Mon Sep 17 00:00:00 2001 From: Aosen Xiong <82676488+Ao-senXiong@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:51:42 -0400 Subject: [PATCH 10/17] Update Makefile --- docs/examples/lombok/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/examples/lombok/Makefile b/docs/examples/lombok/Makefile index 31180a82ddd..fad2c712390 100644 --- a/docs/examples/lombok/Makefile +++ b/docs/examples/lombok/Makefile @@ -15,7 +15,8 @@ all: && grep -qF "Foo.java:12: error: [assignment.type.incompatible] incompatible types in assignment." Out.txt \ && grep -qF "y = null; // error" Out.txt) \ || (echo "===== start of Out.txt =====" && cat Out.txt && echo "===== end of Out.txt =====" && false) +endif + clean: ../../../gradlew clean rm -f Out.txt -endif From 52981d7239b6fe696fbfe04e19e935859b6e602a Mon Sep 17 00:00:00 2001 From: Aosen Xiong <82676488+Ao-senXiong@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:52:52 -0400 Subject: [PATCH 11/17] Only clean twice --- checker/bin-devel/test-cftests-junit.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/checker/bin-devel/test-cftests-junit.sh b/checker/bin-devel/test-cftests-junit.sh index 8f174e4e731..bd4d3884ec5 100755 --- a/checker/bin-devel/test-cftests-junit.sh +++ b/checker/bin-devel/test-cftests-junit.sh @@ -17,4 +17,3 @@ source "$SCRIPTDIR"/clone-related.sh # Test clean task ./gradlew clean ./gradlew clean -./gradlew clean From 0b1e15c7d43af8bef0abf12f4c4ff944e3d1e901 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Sat, 31 Aug 2024 10:00:16 -0400 Subject: [PATCH 12/17] Test with version specific command --- docs/examples/lombok/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/examples/lombok/Makefile b/docs/examples/lombok/Makefile index fad2c712390..13d59bc85e4 100644 --- a/docs/examples/lombok/Makefile +++ b/docs/examples/lombok/Makefile @@ -17,6 +17,12 @@ all: || (echo "===== start of Out.txt =====" && cat Out.txt && echo "===== end of Out.txt =====" && false) endif +ifeq ($(OS),Windows_NT) + GRADLEW_CMD := ..\..\..\gradlew.bat +else + GRADLEW_CMD := ../../../gradlew +endif + clean: - ../../../gradlew clean + $(GRADLEW_CMD) clean rm -f Out.txt From 6c86fdc1169deb9ffb113ffa031fd63ce3e4a8b9 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Sat, 31 Aug 2024 10:42:41 -0400 Subject: [PATCH 13/17] Also use version specific command for errorprone Makefile --- docs/examples/errorprone/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/examples/errorprone/Makefile b/docs/examples/errorprone/Makefile index 392ab070cb1..377e367e8ac 100644 --- a/docs/examples/errorprone/Makefile +++ b/docs/examples/errorprone/Makefile @@ -7,6 +7,12 @@ all: grep -qF "Demo.java:7: warning: [CollectionIncompatibleType] Argument 'i - 1' should not be passed to this method; its type int is not compatible with its collection's type argument Short" Out.txt grep -qF "Demo.java:8: error: [argument.type.incompatible] incompatible argument for parameter arg0 of Set.add." Out.txt +ifeq ($(OS),Windows_NT) + GRADLEW_CMD := ..\..\..\gradlew.bat +else + GRADLEW_CMD := ../../../gradlew +endif + clean: - ../../../gradlew clean + $(GRADLEW_CMD) clean rm -f Out.txt From 9f3d2a7ec35b223931c0e370f6375e42b076b1a2 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Mon, 2 Sep 2024 21:23:42 -0400 Subject: [PATCH 14/17] Empty commit for CI From a90de5dc41b99293c3bf307ded6db5ee63738020 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Tue, 3 Sep 2024 17:28:01 -0400 Subject: [PATCH 15/17] Undo os specific command and ignore errors --- docs/examples/errorprone/Makefile | 8 +------- docs/examples/lombok/Makefile | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/docs/examples/errorprone/Makefile b/docs/examples/errorprone/Makefile index 377e367e8ac..c82ed0cd3d5 100644 --- a/docs/examples/errorprone/Makefile +++ b/docs/examples/errorprone/Makefile @@ -7,12 +7,6 @@ all: grep -qF "Demo.java:7: warning: [CollectionIncompatibleType] Argument 'i - 1' should not be passed to this method; its type int is not compatible with its collection's type argument Short" Out.txt grep -qF "Demo.java:8: error: [argument.type.incompatible] incompatible argument for parameter arg0 of Set.add." Out.txt -ifeq ($(OS),Windows_NT) - GRADLEW_CMD := ..\..\..\gradlew.bat -else - GRADLEW_CMD := ../../../gradlew -endif - clean: - $(GRADLEW_CMD) clean + - ../../../gradlew clean rm -f Out.txt diff --git a/docs/examples/lombok/Makefile b/docs/examples/lombok/Makefile index 13d59bc85e4..3cd6a335b59 100644 --- a/docs/examples/lombok/Makefile +++ b/docs/examples/lombok/Makefile @@ -17,12 +17,6 @@ all: || (echo "===== start of Out.txt =====" && cat Out.txt && echo "===== end of Out.txt =====" && false) endif -ifeq ($(OS),Windows_NT) - GRADLEW_CMD := ..\..\..\gradlew.bat -else - GRADLEW_CMD := ../../../gradlew -endif - clean: - $(GRADLEW_CMD) clean + - ../../../gradlew clean rm -f Out.txt From 4e2a80d87b7b593ac8f85c82b5171b760778517d Mon Sep 17 00:00:00 2001 From: Aosen Xiong <82676488+Ao-senXiong@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:55:21 -0400 Subject: [PATCH 16/17] Remove clean task for nonjunit test --- checker/bin-devel/test-cftests-nonjunit.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/checker/bin-devel/test-cftests-nonjunit.sh b/checker/bin-devel/test-cftests-nonjunit.sh index ed2711a1f9a..685321e9a3e 100755 --- a/checker/bin-devel/test-cftests-nonjunit.sh +++ b/checker/bin-devel/test-cftests-nonjunit.sh @@ -18,5 +18,3 @@ source "$SCRIPTDIR"/clone-related.sh # the release script because the newest maven artifacts are not published yet. ./gradlew :checker:exampleTests -x javadoc -x allJavadoc --console=plain --warning-mode=all -# Test clean task -./gradlew clean From 84fe295fddf4885e4864a07f944e95ddf8ead7d6 Mon Sep 17 00:00:00 2001 From: Aosen Xiong <82676488+Ao-senXiong@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:55:52 -0400 Subject: [PATCH 17/17] Remove redundant line --- checker/bin-devel/test-cftests-nonjunit.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/checker/bin-devel/test-cftests-nonjunit.sh b/checker/bin-devel/test-cftests-nonjunit.sh index 685321e9a3e..55667f55a0c 100755 --- a/checker/bin-devel/test-cftests-nonjunit.sh +++ b/checker/bin-devel/test-cftests-nonjunit.sh @@ -17,4 +17,3 @@ source "$SCRIPTDIR"/clone-related.sh # Moved example-tests out of all tests because it fails in # the release script because the newest maven artifacts are not published yet. ./gradlew :checker:exampleTests -x javadoc -x allJavadoc --console=plain --warning-mode=all -