hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

[ CLI | Regression ] 4.154 --hphp does not interpret `--module .` to mean "compile everything"

Open lexidor opened this issue 3 years ago • 0 comments

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:

  1. Copy the files listed above to an otherwise empty directory.
  2. Build to docker image.
  3. Run a container from this image.
  4. Access the site hosted on 8080 and access /src/bench.hack.
  5. Observe Yes, everything is working!.
  6. Shut the container down.
  7. Change the version number in the Dockerfile to 4.154-latest.
  8. Rebuild the image.
  9. Run a container from the image.
  10. Access the site hosted on 8080 and access /src/bench.hack.
  11. Observe RequestInitDocument Not Found.
  12. 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

lexidor avatar Apr 07 '22 19:04 lexidor