Repository navigation
Contributing
npm i lix
npx lix download
npx haxe build.hxmlnpx haxe run.hxml also builds run.n, which haxelib run ax4 needs when the clone is installed with haxelib dev ax4 ..
java -jar converter.jar tests/config.jsonnpx haxe test-compat.hxmlcompat/ is the runtime compatibility layer used by converted projects.
compat-test/ is its test suite, run on JS (Node), C++ (hxcpp) and Flash (test.swf, opened with the system's Flash Player). When you change anything in compat/, update tests in compat-test/ and run npx haxe test-compat.hxml.
- Put AS3 input in
tests/src/. - Generated Haxe goes to
tests/out/. - Every test source file should explain case and expected behavior in comments.
- Filter tests naming convention:
TestFilter{FilterName}.as- Example:
RewriteAs.hx->TestFilterRewriteAs.as
- Other tests can use
Test{Feature}.as.
Current state:
- Most converter tests are still manual/inspection-based (
tests/src-> run converter -> inspecttests/out).
Future direction:
- Move toward automated checks (expected output diff, compile smoke tests, and execution tests where relevant) so regressions are caught in CI.
- Non-blocking
reportErrorpaths should be intentionally covered by tests. - Do not trigger
throwErrorin normal conversion/regression suites because it aborts the converter. - Add dedicated negative tests for
throwErrorpaths only when you are explicitly working on that specific failure mode. - If a
reportErrorpath effectively throws in practice, treat it as a throw case.
- Reproduce with smallest possible AS3 sample under
tests/src/. - Run converter and inspect
tests/out/. - Implement filter/typer/gen fix.
- Re-run converter.
- Run
npx haxe test-compat.hxmlif compat/runtime was touched.
tools/CompatAudit.hx counts the ASCompat/ASAny calls of a converted project by static argument types, so coercions on already-typed values (toInt(Int), toNumber(Float)...) show up as converter work. Usage is in its header comment.
Set version and releasenote in haxelib.json, commit, then push a matching vX.Y.Z tag. The Release workflow rebuilds converter.jar and run.n, converts the test workspace, submits the package to lib.haxe.org (repository secret HAXELIB_PASSWORD) and attaches it to a GitHub release. Running the workflow by hand builds the package without publishing it.