From 5871f06803038534f6daa51ddb87929bbae5d260 Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Thu, 4 Dec 2025 08:57:36 +0100 Subject: [PATCH 1/7] [CI] Run tests with haxe latest, 4.3.7, 4.2.5 --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 026aaad2..5d84e7f4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,12 +9,16 @@ on: jobs: build: + strategy: + matrix: + haxe-version: [latest, 4.3.7, 4.2.5] + fail-fast: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: krdlab/setup-haxe@v1 with: - haxe-version: 4.3.4 + haxe-version: ${{ matrix.haxe-version }} - name: Install haxelib dependencies run: | haxelib install hx3compat From 98bd32254f0e4ad962f1d2b42368f1302cd8a120 Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Thu, 4 Dec 2025 09:04:02 +0100 Subject: [PATCH 2/7] hscript.Checker replace ?. with classic syntax --- hscript/Checker.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hscript/Checker.hx b/hscript/Checker.hx index 7ee549da..7be5b746 100644 --- a/hscript/Checker.hx +++ b/hscript/Checker.hx @@ -1052,7 +1052,7 @@ class Checker { switch( e.e ) { case EField(obj, f): if( cf.isMethod ) { - switch( callExpr?.e ) { + switch( callExpr == null ? null : callExpr.e ) { case null: case ECall(ec,params) if( ec == e ): e.e = EField(acc,f); From ab462208619b0d4aeed9873a216efef7ad745cee Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Thu, 4 Dec 2025 09:11:47 +0100 Subject: [PATCH 3/7] hscript.JsInterp fix missing return for 4.2.5 (probably not detecting throw) --- hscript/JsInterp.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hscript/JsInterp.hx b/hscript/JsInterp.hx index 9161c441..2f91a7d6 100644 --- a/hscript/JsInterp.hx +++ b/hscript/JsInterp.hx @@ -264,6 +264,7 @@ class JsInterp extends Interp { default: error(EInvalidOp(op)); } + return null; case EUnop(op, prefix, e): switch( op ) { case "!": @@ -300,6 +301,7 @@ class JsInterp extends Interp { default: error(EInvalidOp(op)); } + return null; case ECall(e, params): var args = [for( p in params ) exprValue(p)]; switch( Tools.expr(e) ) { From 657bf34869541f8ac2a5c2d2dfadd9998186eb03 Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Mon, 5 Jan 2026 15:57:29 +0100 Subject: [PATCH 4/7] Tmp fix CI setup-haxe latest with hash --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d84e7f4..ca3ce00e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: build: strategy: matrix: - haxe-version: [latest, 4.3.7, 4.2.5] + haxe-version: [2026-01-05_development_3aed86e, 4.3.7, 4.2.5] fail-fast: false runs-on: ubuntu-latest steps: From 21286ddb47011e5f8d61fe80aa6f056caa6a4fd0 Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Thu, 15 Jan 2026 09:15:07 +0100 Subject: [PATCH 5/7] Latest is now working again with setup-haxe v2 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca3ce00e..4b4265e3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,12 +11,12 @@ jobs: build: strategy: matrix: - haxe-version: [2026-01-05_development_3aed86e, 4.3.7, 4.2.5] + haxe-version: [latest, 4.3.7, 4.2.5] fail-fast: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: krdlab/setup-haxe@v1 + - uses: krdlab/setup-haxe@v2 with: haxe-version: ${{ matrix.haxe-version }} - name: Install haxelib dependencies From 89391957c6e9d64f8d31b70e8b2b169860cd6654 Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Thu, 15 Jan 2026 09:20:02 +0100 Subject: [PATCH 6/7] Replace ?? with ?: --- hscript/Checker.hx | 2 +- hscript/LiveClass.hx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hscript/Checker.hx b/hscript/Checker.hx index cf060ea5..399a6708 100644 --- a/hscript/Checker.hx +++ b/hscript/Checker.hx @@ -1534,7 +1534,7 @@ class Checker { function getTypeAccess( t : TType, expr : Expr, ?field : String ) : ExprDef { var path = switch( t ) { - case TInst(c,_): c.runtimePath ?? c.name; + case TInst(c,_): c.runtimePath != null ? c.runtimePath : c.name; case TEnum(e,_): e.name; default: return null; } diff --git a/hscript/LiveClass.hx b/hscript/LiveClass.hx index 11d04192..20b04397 100644 --- a/hscript/LiveClass.hx +++ b/hscript/LiveClass.hx @@ -25,7 +25,7 @@ class LiveClass { if( api == null ) CONFIG = null; else - CONFIG = { api : api, srcPath : srcPath ?? [".","src"] } + CONFIG = { api : api, srcPath : srcPath != null ? srcPath : [".","src"] } } static function hasRet( e : Expr ) : Bool { From fb443f7cf6f363da73011a42a2bb6adef4b1fa78 Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Thu, 15 Jan 2026 09:23:21 +0100 Subject: [PATCH 7/7] hscript.Interp Move static var outside of function --- hscript/Interp.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hscript/Interp.hx b/hscript/Interp.hx index ce8cb58d..b2c959b0 100644 --- a/hscript/Interp.hx +++ b/hscript/Interp.hx @@ -56,11 +56,13 @@ class Interp { variables.set("$resolve", resolveType); } + #if js + static var ABS_CACHE = new Map(); + #end function resolveType( path : String ) : Dynamic { #if js // abstract type is not part of the class map if( path.charCodeAt(0) == '#'.code ) { - static var ABS_CACHE = new Map(); var c = ABS_CACHE.get(path); if( c != null ) return c; c = js.Lib.eval(path.substr(1));