THRIFT-6003: Add Haxe codegen test script and GitHub Actions CI job#3482
Merged
Conversation
Client: haxe Tests the Haxe code generator by compiling every .thrift file in the repository against the local Thrift library (via haxelib dev) for the html5/JS target. The PowerShell script supports optional parameters for output folder and extra IDL search path, keeping local dev behaviour unchanged when called without arguments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Client: haxe
Fix: install Haxe via apt (krdlab/setup-haxe not on ASF allowlist);
add compiler/cpp to PATH so FindThriftExe can locate downloaded binary
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Client: haxe Fix: run haxelib setup before haxelib install (apt install does not initialise the repo) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/haxe/codegen/run-Haxe-Codegen-Tests.ps1: a PowerShell script that tests the Haxe code generator by compiling every.thriftfile in the repository against the Thrift library for the html5/JS targethtml5.hxmlandCodegenTest.hxprojused during test compilation-TargetFolderand-ExtraThriftFiles(backward-compatible; default behaviour unchanged when called without arguments)lib-haxe-codegenjob to.github/workflows/build.ymlusing the pre-builtthrift-compilerartifactHow the test works
For each
.thriftfile:thrift --gen haxeto produce Haxe codeMain.hxthat imports all generated namespaceshaxe html5.hxml(html5 target)Known-failure lists in the script handle files that are intentionally expected to fail.
Key design detail: local library via
haxelib devThe
html5.hxmluses-lib thrift. Without intervention this would resolve from the haxelib.org registry. The CI job runs:haxelib dev thrift ${{ github.workspace }}/lib/haxeThis registers the local
lib/haxetree as the active version, ensuring the code generator and library under test are always from the same commit.haxelib path thriftis then printed to the log for verification.Test plan
lib-haxe-codegenappears in GitHub Actions and passeshaxelib path thriftlog line shows local workspace path, not a registry cache pathbuild.ymlare affectedNotes
krdlab/setup-haxepinned to SHA23a78f711bc4a623db38eac90d351ff0027f0116(v2.0.2)🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com