Jens-G opened a new pull request, #3482:
URL: https://github.com/apache/thrift/pull/3482
## Summary
- Adds `lib/haxe/codegen/run-Haxe-Codegen-Tests.ps1`: a PowerShell script
that tests the Haxe code generator by compiling every `.thrift` file in the
repository against the Thrift library for the html5/JS target
- Adds companion project files `html5.hxml` and `CodegenTest.hxproj` used
during test compilation
- Extends the script with optional parameters `-TargetFolder` and
`-ExtraThriftFiles` (backward-compatible; default behaviour unchanged when
called without arguments)
- Adds `lib-haxe-codegen` job to `.github/workflows/build.yml` using the
pre-built `thrift-compiler` artifact
## How the test works
For each `.thrift` file:
1. Run `thrift --gen haxe` to produce Haxe code
2. Generate a `Main.hx` that imports all generated namespaces
3. Compile to JavaScript via `haxe html5.hxml` (html5 target)
4. Any Haxe compilation error is a codegen regression
Known-failure lists in the script handle files that are intentionally
expected to fail.
## Key design detail: local library via `haxelib dev`
The `html5.hxml` uses `-lib thrift`. Without intervention this would resolve
from the haxelib.org registry. The CI job runs:
```bash
haxelib dev thrift ${{ github.workspace }}/lib/haxe
```
This registers the local `lib/haxe` tree as the active version, ensuring the
code generator and library under test are always from the same commit. `haxelib
path thrift` is then printed to the log for verification.
## Test plan
- [ ] CI job `lib-haxe-codegen` appears in GitHub Actions and passes
- [ ] `haxelib path thrift` log line shows local workspace path, not a
registry cache path
- [ ] No existing jobs in `build.yml` are affected
## Notes
- `krdlab/setup-haxe` pinned to SHA
`23a78f711bc4a623db38eac90d351ff0027f0116` (v2.0.2)
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]