hhvm
hhvm copied to clipboard
[ CLI | Regression ] 4.154 --hphp does not interpret `--module .` to mean "compile everything"
Describe the bug
Hhvm 4.153 and below interpret hhvm --hphp -t hhbc --module . to mean "compile everything in my cwd and all recursive sub directories". Hhvm 4.154 does not do this.
Standalone code, or other way to reproduce the problem
The following four files should be placed in an otherwise empty directory. This issue manifests both in and outside of Docker. For ease of repro, here is a dockerized minimal example.
.hhconfig
[empty file]
server.ini
hhvm.server.allow_run_as_root=1
hhvm.server.port = 8080
hhvm.server.allowed_files[] = src/bench.hack
hhvm.repo.authoritative = true
hhvm.repo.path = /mnt/project/hhvm.hhbc
src/bench.hack
<<__EntryPoint>>
async function main_async(): Awaitable<void> {
echo "Yes, everything is working!\n";
}
Dockerfile
FROM hhvm/hhvm:4.153-latest AS base
COPY . /mnt/project/
RUN cd /mnt/project && \
hh_server --check . && \
hhvm --hphp -t hhbc -l3 --module . --output-dir /mnt/project/ -c server.ini
CMD hhvm -m server -c /mnt/project/server.ini
Steps to reproduce the behavior:
- Copy the files listed above to an otherwise empty directory.
- Build to docker image.
- Run a container from this image.
- Access the site hosted on 8080 and access /src/bench.hack.
- Observe
Yes, everything is working!. - Shut the container down.
- Change the version number in the Dockerfile to 4.154-latest.
- Rebuild the image.
- Run a container from the image.
- Access the site hosted on 8080 and access /src/bench.hack.
- Observe
RequestInitDocument Not Found. - Observe a notice being printed to the hhvm output:
Notice: File could not be loaded: /mnt/project/src/bench.hack
Expected behavior
Hhvm 4.153 and below serve this page, whereas 4.154 and above do not.
Actual behavior
See Steps to reproduce the behavior.
Environment
- Operating system
Ubuntu 18.04 & 21.10.
- Installation method
hhvm/hhvm on dockerhub and Ubuntu 18.04
- HHVM Version
HipHop VM 4.154.1 (rel) (non-lowptr)
Compiler: 1648513649_206704930
Repo schema: 90f78fc0521a9e717aae40e2bb7c2e8e7a00481d
hackc-dc95561ff7cb04664db4a48db13ea6d5db3e0bf4-4.154.1
Additional context