Releases: hhvm/hack-codegen
Support current nightlies
This release supports HHVM 4.1 and current nightly builds
Support HHVM v4.1
This release supports HHVM v4.0, current nightlies, and is expected to support HHVM v4.1
HHVM 3.30-compatible: support rendering doc block for files without signatures
This release brings support for rendering doc blocks in files without signatures to HHVM 3.30
Users of HHVM 4 should use hack-codegen v4.1
Add missing type constraints for Set and ImmSet generation
Set
and ImmSet
elements must be arraykey
s; this was previously enforced by the runtime, but not by the typechecker. In nightly builds, this is now enforced by the typechecker.
Support generating .hack files, and generate doc blocks for files without signatures
.hack
files can be generated by specifying theCodegenFileType::DOT_HACK
file type- docblocks were incorrectly omitted for unsigned files
Support HHVM 4.0
v4.1.0 Depend on HHVM 4
Support HHVM 3.30
v4.0.2 be friendly with 3.30
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.
Major API update
This release contains many changes to increase consistency, flexibility, and usability:
addConst
is nowaddConstant
- if called on a class, it now takes a
CodegenClassConstant
object - if called on a file, it now takes a
CodegenConstant
object
- if called on a class, it now takes a
addTypeConst
is nowaddTypeConstant
and takes aCodegenTypeConstant
object- adds
CodegenShape
andCodegenShapeMember
objects - adds
HackBuilderValues::codegen()
to allow building aCodegen*
as a value - renamed various
*Base
classes to*ish
for consistency with other internal classes, HHAST, and the Hack parser - for example,CodegenClassish
- adds support for adding constraints to generics
- uses HSL format strings throughout
- uses
\0
instead of\t
as the separator for functions that accept suggested whitespace, allowing use where tabs are desired instead of spaces - add
HackBuilderValues::regex()
to support rendering re prefix strings CodegenEnum
is no longer aCodegenClassish
, as the majority of methods were not relevant- added
addVerbatim
to HackBuilder. This does not auto-indent the results; one use is heredocs.
Support HHVM 3.29
Retag from correct branch.