This repository was archived by the owner on Aug 25, 2025. It is now read-only.
Make `codegenScript()` handle async entrypoints
Generated files can contain instructions on how to re-generate them; one supported way is to say 'run this script'. If codegenScript() is used without specifying the script, Hack-Codegen attempts to infer it from the trace.
In previous releases, Hack-Codegen would attempt to use the file from the outermost entry in the backtrace. When using async entrypoints, the outermost entry is builtin, so has no file.
In this release, we filter the backtrace to only entries with files, and select the last one.