Repository navigation
Put ThreadPool's AtomicInt import before its first class - #497
Merged
Merged
Conversation
The WorkerExit class that 7c475ba added for the compile threads (#471) went above the "#if cpp import cpp.AtomicInt; #end" block, and Haxe refuses an import after a declaration, so haxe compile-cpp.hxml in tools/hxcpp stopped with "import and using may not appear after a declaration". The neko build tool never sees that import, so hxcpp.n built, and CI, which builds only hxcpp.n, passed. run.n prefers bin/<host>/BuildTool once someone has built it, so only rebuilding the C++ build tool failed. The import sits with the others now, and the check-headers job type-checks the C++ build tool with --no-output, which fails with that error before this change and passes after it. Tests: haxe compile-cpp.hxml -D HXCPP_M64 builds bin/Windows64/BuildTool.exe on Windows x64 with Haxe 4.3.7. Through it, a small threaded program builds and runs, and test/compile_errors/check.sh passes, its four builds failing as they should. The binary was deleted afterwards.
dimensionscape
force-pushed
the
feature/adoring-burnell-7378f6
branch
from
November 27, 2026 22:06
b697389 to
1162606
Compare
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.
For 6.0.3. The C++ build tool (
haxe compile-cpp.hxmlintools/hxcpp) has not compiled since 6.0.0. TheWorkerExitclass that 7c475ba added for the compile threads (#471) went above the#if cpp import cpp.AtomicInt; #endblock, and Haxe 4.3.7 refuses an import after a declaration:The neko build tool never sees that import, so
hxcpp.nbuilt, and CI, which builds onlyhxcpp.n, passed.run.nprefersbin/<host>/BuildToolonce someone has built it, so only rebuilding the C++ build tool failed.The change
ThreadPool.hx.haxe -cp tools/hxcpp -main BuildTool -D HXCPP_NEKO_BUILDTOOL=1 -cpp out --no-output, which writes nothing. It fails with the error above on main and passes with the fix.Changes.mdline.Tests
Run on Windows x64 with Haxe 4.3.7 and MSVC:
haxe compile-cpp.hxml -D HXCPP_M64buildsbin/Windows64/BuildTool.exeagainst this branch's runtime.test/compile_errors/check.sh, the Build tool: a failed compile can link the old object, and exiting from a compile thread hangs #471 compile-thread checks thatWorkerExitis for, passes through the new binary: all four builds fail as they should, none hangs.The new CI step has not run yet.