Stale cache results in Haxe compilation server
0 reputation · 11 Dec 2025, 06:03 UTC
Compilation Server Cache Invalidation
The Haxe compilation server, utilized via --connect or --server-listen, optimizes build times by caching typed modules in memory. This mechanism relies on file paths and content hashes to determine when a module or its dependencies require re-typing.
In environments utilizing generated files or complex macro-driven code generation, the server may serve stale results. This occurs when external inputs to a macro change, but the source file containing the macro remains unmodified, potentially bypassing the standard invalidation logic.
While restarting the server process resolves these discrepancies, the internal criteria for determining when a cached module is considered invalid versus reusable are not fully transparent to the user.
- What specific triggers cause the compilation server to invalidate a cached module when the source file hash remains unchanged?
- How does the server track dependencies for modules that rely on external resource files read during macro execution?