Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Commit d96effb

Browse files
committed
HHAST top-level-requires fix
1 parent c72386e commit d96effb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/dorm/codegen.hack

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ namespace Facebook\HackCodegen;
1212

1313
use namespace HH\Lib\{C, Vec};
1414

15-
require_once(__DIR__.'/../../vendor/hh_autoload.hh');
16-
1715
final class DormCodegenCLI extends \Facebook\CLILib\CLIWithRequiredArguments {
1816
<<__Override>>
1917
public static function getHelpTextForRequiredArguments(): vec<string> {
@@ -59,6 +57,10 @@ final class DormCodegenCLI extends \Facebook\CLILib\CLIWithRequiredArguments {
5957

6058
<<__EntryPoint>>
6159
async function dorm_codegen_cli_main_async(): Awaitable<noreturn> {
60+
(() ==> {
61+
// HHAST-generated to avoid pseudomain local leaks
62+
require_once(__DIR__.'/../../vendor/hh_autoload.hh');
63+
})();
6264
$exit_code = await DormCodegenCLI::runAsync();
6365
exit($exit_code);
6466
}

examples/dorm/demo/demo_usage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
namespace Facebook\HackCodegen;
1212

13-
require_once('DormUserMutator.php');
14-
require_once('DormUser.php');
13+
/* HH_FIXME[1002] HHAST: move to <<__EntryPoint>> function */ require_once('DormUserMutator.php');
14+
/* HH_FIXME[1002] HHAST: move to <<__EntryPoint>> function */ require_once('DormUser.php');
1515

1616
/**
1717
* This is to demo how the Dorm classes for User can be used.

0 commit comments

Comments
 (0)