From 3eda297a44a0053680abbc4a0a1bda9ba9194d75 Mon Sep 17 00:00:00 2001 From: AlexHaxe Date: Fri, 10 Jan 2025 01:37:50 +0100 Subject: [PATCH] updated libs cleanup --- .github/workflows/main.yml | 4 ++-- haxe_libraries/hxnodejs.hxml | 14 +++++++------- haxe_libraries/json2object.hxml | 4 ++-- samples/buddy/haxe_libraries/test-adapter.hxml | 2 +- samples/haxeunit/haxe_libraries/test-adapter.hxml | 2 +- samples/hexunit/haxe_libraries/test-adapter.hxml | 2 +- samples/munit/haxe_libraries/test-adapter.hxml | 2 +- .../tink_unittest/haxe_libraries/test-adapter.hxml | 2 +- samples/utest/haxe_libraries/test-adapter.hxml | 2 +- samples/utest/src/Main.hx | 7 ++----- test-adapter/_testadapter/data/TestFilter.hx | 8 ++++---- test-adapter/_testadapter/utest/Reporter.hx | 4 ++++ 12 files changed, 27 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d94fca3..4ded2b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,11 +10,11 @@ jobs: build: strategy: matrix: - haxe-version: [3.4.7, 4.0.5, 4.1.5, 4.2.5, 4.3.3, nightly] + haxe-version: [3.4.7, 4.0.5, 4.1.5, 4.2.5, 4.3.6, nightly] fail-fast: false runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: npm install - name: install dependencies for all samples run: | diff --git a/haxe_libraries/hxnodejs.hxml b/haxe_libraries/hxnodejs.hxml index 577e96a..4fcea51 100644 --- a/haxe_libraries/hxnodejs.hxml +++ b/haxe_libraries/hxnodejs.hxml @@ -1,7 +1,7 @@ -# @install: lix --silent download "haxelib:/hxnodejs#12.1.0" into hxnodejs/12.1.0/haxelib --cp ${HAXE_LIBCACHE}/hxnodejs/12.1.0/haxelib/src --D hxnodejs=12.1.0 ---macro allowPackage('sys') -# should behave like other target defines and not be defined in macro context ---macro define('nodejs') ---macro _internal.SuppressDeprecated.run() +# @install: lix --silent download "haxelib:/hxnodejs#12.2.0" into hxnodejs/12.2.0/haxelib +-cp ${HAXE_LIBCACHE}/hxnodejs/12.2.0/haxelib/src +-D hxnodejs=12.2.0 +--macro allowPackage('sys') +# should behave like other target defines and not be defined in macro context +--macro define('nodejs') +--macro _internal.SuppressDeprecated.run() diff --git a/haxe_libraries/json2object.hxml b/haxe_libraries/json2object.hxml index 897b5a3..5ed25d9 100644 --- a/haxe_libraries/json2object.hxml +++ b/haxe_libraries/json2object.hxml @@ -1,4 +1,4 @@ -# @install: lix --silent download "haxelib:/json2object#3.11.0" into json2object/3.11.0/haxelib +# @install: lix --silent download "gh://github.com/elnabo/json2object#a75859de1e966c09e73591b6c9186086c143fe60" into json2object/3.11.0/github/a75859de1e966c09e73591b6c9186086c143fe60 -lib hxjsonast --cp ${HAXE_LIBCACHE}/json2object/3.11.0/haxelib/src +-cp ${HAXE_LIBCACHE}/json2object/3.11.0/github/a75859de1e966c09e73591b6c9186086c143fe60/src -D json2object=3.11.0 \ No newline at end of file diff --git a/samples/buddy/haxe_libraries/test-adapter.hxml b/samples/buddy/haxe_libraries/test-adapter.hxml index 106f199..8d8e63a 100644 --- a/samples/buddy/haxe_libraries/test-adapter.hxml +++ b/samples/buddy/haxe_libraries/test-adapter.hxml @@ -1,5 +1,5 @@ -lib json2object -cp ../../test-adapter --D test-adapter=2.0.5 +-D test-adapter=2.0.7 ${SCOPE_DIR}/../../test-adapter/extraParams.hxml --macro Sys.println("haxe_libraries/test-adapter.hxml:3: [Warning] Using dev version of library test-adapter") \ No newline at end of file diff --git a/samples/haxeunit/haxe_libraries/test-adapter.hxml b/samples/haxeunit/haxe_libraries/test-adapter.hxml index 106f199..8d8e63a 100644 --- a/samples/haxeunit/haxe_libraries/test-adapter.hxml +++ b/samples/haxeunit/haxe_libraries/test-adapter.hxml @@ -1,5 +1,5 @@ -lib json2object -cp ../../test-adapter --D test-adapter=2.0.5 +-D test-adapter=2.0.7 ${SCOPE_DIR}/../../test-adapter/extraParams.hxml --macro Sys.println("haxe_libraries/test-adapter.hxml:3: [Warning] Using dev version of library test-adapter") \ No newline at end of file diff --git a/samples/hexunit/haxe_libraries/test-adapter.hxml b/samples/hexunit/haxe_libraries/test-adapter.hxml index 106f199..8d8e63a 100644 --- a/samples/hexunit/haxe_libraries/test-adapter.hxml +++ b/samples/hexunit/haxe_libraries/test-adapter.hxml @@ -1,5 +1,5 @@ -lib json2object -cp ../../test-adapter --D test-adapter=2.0.5 +-D test-adapter=2.0.7 ${SCOPE_DIR}/../../test-adapter/extraParams.hxml --macro Sys.println("haxe_libraries/test-adapter.hxml:3: [Warning] Using dev version of library test-adapter") \ No newline at end of file diff --git a/samples/munit/haxe_libraries/test-adapter.hxml b/samples/munit/haxe_libraries/test-adapter.hxml index 106f199..8d8e63a 100644 --- a/samples/munit/haxe_libraries/test-adapter.hxml +++ b/samples/munit/haxe_libraries/test-adapter.hxml @@ -1,5 +1,5 @@ -lib json2object -cp ../../test-adapter --D test-adapter=2.0.5 +-D test-adapter=2.0.7 ${SCOPE_DIR}/../../test-adapter/extraParams.hxml --macro Sys.println("haxe_libraries/test-adapter.hxml:3: [Warning] Using dev version of library test-adapter") \ No newline at end of file diff --git a/samples/tink_unittest/haxe_libraries/test-adapter.hxml b/samples/tink_unittest/haxe_libraries/test-adapter.hxml index 106f199..8d8e63a 100644 --- a/samples/tink_unittest/haxe_libraries/test-adapter.hxml +++ b/samples/tink_unittest/haxe_libraries/test-adapter.hxml @@ -1,5 +1,5 @@ -lib json2object -cp ../../test-adapter --D test-adapter=2.0.5 +-D test-adapter=2.0.7 ${SCOPE_DIR}/../../test-adapter/extraParams.hxml --macro Sys.println("haxe_libraries/test-adapter.hxml:3: [Warning] Using dev version of library test-adapter") \ No newline at end of file diff --git a/samples/utest/haxe_libraries/test-adapter.hxml b/samples/utest/haxe_libraries/test-adapter.hxml index 106f199..8d8e63a 100644 --- a/samples/utest/haxe_libraries/test-adapter.hxml +++ b/samples/utest/haxe_libraries/test-adapter.hxml @@ -1,5 +1,5 @@ -lib json2object -cp ../../test-adapter --D test-adapter=2.0.5 +-D test-adapter=2.0.7 ${SCOPE_DIR}/../../test-adapter/extraParams.hxml --macro Sys.println("haxe_libraries/test-adapter.hxml:3: [Warning] Using dev version of library test-adapter") \ No newline at end of file diff --git a/samples/utest/src/Main.hx b/samples/utest/src/Main.hx index 6dd1171..7869301 100644 --- a/samples/utest/src/Main.hx +++ b/samples/utest/src/Main.hx @@ -35,11 +35,8 @@ class TestCase extends utest.Test { Sys.sleep(Math.random()); } - #if (utest >= version("2.0.0-alpha")) - @:ignore("Description") - #else - @Ignored("Description") - #end + @Ignored("Description") // utest 1.x + @:ignore("Description") // utest 2.x function testIgnore() {} } diff --git a/test-adapter/_testadapter/data/TestFilter.hx b/test-adapter/_testadapter/data/TestFilter.hx index e79ec51..ec61095 100644 --- a/test-adapter/_testadapter/data/TestFilter.hx +++ b/test-adapter/_testadapter/data/TestFilter.hx @@ -47,7 +47,7 @@ class TestFilter { public function get():TestFilterList { if (!loaded) { - load(); + load(baseFolder); } return testFilters; } @@ -55,7 +55,7 @@ class TestFilter { public function clear() { testFilters.include = []; testFilters.exclude = []; - save(); + save(baseFolder); } function save(?baseFolder:String) { @@ -69,11 +69,11 @@ class TestFilter { #end } - function load() { + function load(?baseFolder:String) { testFilters.include = []; testFilters.exclude = []; #if (sys || nodejs) - var fileName:String = getFileName(); + var fileName:String = getFileName(baseFolder); if (!FileSystem.exists(fileName)) { return; } diff --git a/test-adapter/_testadapter/utest/Reporter.hx b/test-adapter/_testadapter/utest/Reporter.hx index 652a24b..5971d96 100644 --- a/test-adapter/_testadapter/utest/Reporter.hx +++ b/test-adapter/_testadapter/utest/Reporter.hx @@ -94,8 +94,12 @@ class Reporter implements IReport { public function setHandler(handler:Reporter->Void) {} } +#if haxe4 #if (utest >= version("2.0.0-alpha")) typedef Stack = CallStack; #else typedef Stack = Array; #end +#else +typedef Stack = Array; +#end