hhvm/hhvm-autoload

Error when installing hhvm-autoload and executing hh_client.

LAGGOUNE-Walid opened this issue · 4 comments

This is my installation for hhvm-autoload : https://imgur.com/a/5AiRCV3
This is the result from hh_client : https://pastebin.com/CUnYQT8f

i'm i wrong in something ?

The pastebin link (https://pastebin.com/CUnYQT8f) seems to be dead, could you copy the error message here? The hhvm-autoload installation looks OK. You could also try restarting Hack (killall hh_server)

@jjergus This is the error messages :
Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/bin/hh-autoload.hack:179:28
177 | <<__EntryPoint>>
178 | function cli_main(): noreturn {
[1] 179 | GenerateScript::main(vec(/* HH_FIXME[4110] */ \HH\global_get('argv')));
180 | exit(0);
181 | }

Typing[4110] Invalid argument [1]
-> Expected Traversable<[unresolved]> [2]
-> But got mixed [3]

vendor/bin/hh-autoload.hack:179:49
177 | <<__EntryPoint>>
178 | function cli_main(): noreturn {
[1] 179 | GenerateScript::main(vec(/* HH_FIXME[4110] */ \HH\global_get('argv')));
180 | exit(0);
181 | }

/tmp/hh_server/hhi_3146af37/container_functions.hhi:88:80
86 | /
87 | <<__Pure, __AtMostRxAsArgs>>
[2] 88 | function vec(<<__OnlyRxIfImpl(\HH\Rx\Traversable::class), __MaybeMutable>> Traversable $arr): vec;
89 |
90 | /
*

/tmp/hh_server/hhi_3146af37/stdlib/builtins_globals.hhi:13:37
11 | namespace HH {
12 |
[3] 13 | function global_get(string $key): mixed;
14 | function global_isset(string $key): bool;
15 | function global_key_exists(string $key): bool;

Naming[2012] Name already bound: Facebook\AutoloadMap\GenerateScript [1]
-> Previous definition is here [2]

vendor/hhvm/hhvm-autoload/bin/hh-autoload.hack:15:13
13 | use namespace HH\Lib\Vec;
14 |
[1] 15 | final class GenerateScript {
16 | const type TOptions = shape(
17 | 'dev' => bool,

vendor/bin/hh-autoload.hack:15:13
13 | use namespace HH\Lib\Vec;
14 |
[2] 15 | final class GenerateScript {
16 | const type TOptions = shape(
17 | 'dev' => bool,

Naming[2012] Name already bound: Facebook\AutoloadMap\cli_main [1]
-> Previous definition is here [2]

vendor/hhvm/hhvm-autoload/bin/hh-autoload.hack:178:10
176 |
177 | <<__EntryPoint>>
[1] 178 | function cli_main(): noreturn {
179 | GenerateScript::main(vec(/* HH_FIXME[4110] */ \HH\global_get('argv')));
180 | exit(0);

vendor/bin/hh-autoload.hack:178:10
176 |
177 | <<__EntryPoint>>
[2] 178 | function cli_main(): noreturn {
179 | GenerateScript::main(vec(/* HH_FIXME[4110] */ \HH\global_get('argv')));
180 | exit(0);

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hhvm-autoload/bin/hh-autoload.hack:142:27
140 | ->setRoot(\getcwd())
141 | ->setRelativeAutoloadRoot($importer->getConfig()['relativeAutoloadRoot'])
[1] 142 | ->setFailureHandler(/* HH_IGNORE_ERROR[4110] */ $handler)
143 | ->setIsDev($options['dev'])
144 | ->writeToDirectory(\getcwd().'/vendor/');

Typing[4110] Invalid argument [1]
-> Expected classname<Facebook\AutoloadMap\FailureHandler> [2]
-> But got string [3]

vendor/hhvm/hhvm-autoload/bin/hh-autoload.hack:142:55
140 | ->setRoot(\getcwd())
141 | ->setRelativeAutoloadRoot($importer->getConfig()['relativeAutoloadRoot'])
[1] 142 | ->setFailureHandler(/* HH_IGNORE_ERROR[4110] */ $handler)
143 | ->setIsDev($options['dev'])
144 | ->writeToDirectory(\getcwd().'/vendor/');

vendor/hhvm/hhvm-autoload/src/Writer.hack:41:38
39 |
40 | /** Class to use to handle lookups for items not in the map */
[2] 41 | public function setFailureHandler(?classname $handler): this {
42 | $this->failureHandler = $handler;
43 | return $this;

vendor/hhvm/hhvm-autoload/src/Config.hack:19:24
17 | 'extraFiles' => vec,
18 | 'parser' => Parser,
[3] 19 | 'failureHandler' => ?string,
20 | 'devFailureHandler' => ?string,
21 | 'relativeAutoloadRoot' => bool,

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hhvm-autoload/bin/hh-autoload.hack:179:28
177 | <<__EntryPoint>>
178 | function cli_main(): noreturn {
[1] 179 | GenerateScript::main(vec(/* HH_FIXME[4110] */ \HH\global_get('argv')));
180 | exit(0);
181 | }

Typing[4110] Invalid argument [1]
-> Expected Traversable<[unresolved]> [2]
-> But got mixed [3]

vendor/hhvm/hhvm-autoload/bin/hh-autoload.hack:179:49
177 | <<__EntryPoint>>
178 | function cli_main(): noreturn {
[1] 179 | GenerateScript::main(vec(/* HH_FIXME[4110] */ \HH\global_get('argv')));
180 | exit(0);
181 | }

/tmp/hh_server/hhi_3146af37/container_functions.hhi:88:80
86 | /
87 | <<__Pure, __AtMostRxAsArgs>>
[2] 88 | function vec(<<__OnlyRxIfImpl(\HH\Rx\Traversable::class), __MaybeMutable>> Traversable $arr): vec;
89 |
90 | /
*

/tmp/hh_server/hhi_3146af37/stdlib/builtins_globals.hhi:13:37
11 | namespace HH {
12 |
[3] 13 | function global_get(string $key): mixed;
14 | function global_isset(string $key): bool;
15 | function global_key_exists(string $key): bool;

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hhvm-autoload/src/HHClientFallbackHandler.hack:98:7
96 | $map['failure'] = inst_meth($this, 'handleFailure');
97 | \HH\autoload_set_paths(
[1] 98 | /* HH_IGNORE_ERROR[4110] incorrect hhi */ $map,
99 | Generated\root(),
100 | );

Typing[4110] Invalid argument [1]
-> Expected KeyedContainer<string, string> [2]
-> But got (function(string $kind, string $name): void) [3]

vendor/hhvm/hhvm-autoload/src/HHClientFallbackHandler.hack:98:49
96 | $map['failure'] = inst_meth($this, 'handleFailure');
97 | \HH\autoload_set_paths(
[1] 98 | /* HH_IGNORE_ERROR[4110] incorrect hhi */ $map,
99 | Generated\root(),
100 | );

/tmp/hh_server/hhi_3146af37/functions.hhi:82:28
80 | function autoload_is_native(): bool;
81 | function autoload_set_paths(
[2] 82 | KeyedContainer<string, KeyedContainer<string, string>> $map,
83 | string $root,
84 | ): bool;

vendor/hhvm/hhvm-autoload/src/FailureHandler.hack:46:25
44 | * in HH\autoload_set_paths().
45 | */
[3] 46 | final public function handleFailure(string $kind, string $name): void {
47 | if ($kind === 'class' || $kind === 'type') {
48 | $this->handleFailedType($name);

Naming[2053] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 2053 in declarations [1]

vendor/hhvm/hhvm-autoload/src/TypeAssert.hack:72:50
70 |
71 | /* HH_IGNORE_ERROR[2053] enum usage */
[1] 72 | function is_nullable_enum<Tval as arraykey, T as \HH\BuiltinEnum>(
73 | classname $what,
74 | mixed $value,

Naming[2053] HH\BuiltinEnum is an implementation internal class that cannot be used directly [1]

vendor/hhvm/hhvm-autoload/src/TypeAssert.hack:72:50
70 |
71 | /* HH_IGNORE_ERROR[2053] enum usage */
[1] 72 | function is_nullable_enum<Tval as arraykey, T as \HH\BuiltinEnum>(
73 | classname $what,
74 | mixed $value,

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/async/Condition.php:33:7
31 | 'Unable to notify AsyncCondition twice',
32 | );
[1] 33 | /* HH_FIXME[4110]: Type error revealed by type-safe instanceof feature. See https://fburl.com/instanceof */
34 | $this->condition->succeed($result);
35 | }

Typing[4110] Invalid argument [1]
-> Expected T#2 from this is expression test [2]
-> via this generic T [3]
-> But got T [4]

vendor/hhvm/hsl/src/async/Condition.php:34:33
21 | * Notify the condition variable of success and set the result.
22 | /
[4] 23 | final public function succeed(T $result): void {
24 | if ($this->condition === null) {
25 | $this->condition = async {
:
28 | } else {
29 | invariant(
[2] 30 | $this->condition is ConditionWaitHandle<_>,
31 | 'Unable to notify AsyncCondition twice',
32 | );
33 | /
HH_FIXME[4110]: Type error revealed by type-safe instanceof feature. See https://fburl.com/instanceof */
[1] 34 | $this->condition->succeed($result);
35 | }
36 | }

/tmp/hh_server/hhi_3146af37/classes.hhi:182:27
180 | public static function create(Awaitable $child): ConditionWaitHandle {}
181 | public static function setOnCreateCallback(?(function(ConditionWaitHandle, WaitableWaitHandle): void) $callback) {}
[3] 182 | public function succeed(T $result): void {}
183 | public function fail(\Exception $exception): void {}
184 | }

Typing[4240] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4240 [1]

vendor/hhvm/hsl/src/c/order.php:46:5
44 |
45 | $comparator ??= (Tv $a, Tv $b) ==>
[1] 46 | /HH_IGNORE_ERROR[4240] Comparison may not be useful on Tv/$a <=> $b;
47 |
48 | $previous = firstx($vec);

Typing[4240] This comparison has invalid types. Only comparisons in which both arguments are strings, nums, DateTime, or DateTimeImmutable are allowed [1]
-> This is a value of generic type Tv [2]
-> This is a value of generic type Tv [3]

vendor/hhvm/hsl/src/c/order.php:46:65
43 | }
44 |
[2,3] 45 | $comparator ??= (Tv $a, Tv $b) ==>
[1] 46 | /HH_IGNORE_ERROR[4240] Comparison may not be useful on Tv/$a <=> $b;
47 |
48 | $previous = firstx($vec);

Typing[4240] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4240 [1]

vendor/hhvm/hsl/src/c/order.php:93:5
91 |
92 | $comparator ??= (Ts $a, Ts $b) ==>
[1] 93 | /HH_IGNORE_ERROR[4240] Comparison may not be useful on Ts/$a <=> $b;
94 |
95 | $previous = $scalar_func(firstx($vec));

Typing[4240] This comparison has invalid types. Only comparisons in which both arguments are strings, nums, DateTime, or DateTimeImmutable are allowed [1]
-> This is a value of generic type Ts [2]
-> This is a value of generic type Ts [3]

vendor/hhvm/hsl/src/c/order.php:93:65
90 | }
91 |
[2,3] 92 | $comparator ??= (Ts $a, Ts $b) ==>
[1] 93 | /HH_IGNORE_ERROR[4240] Comparison may not be useful on Ts/$a <=> $b;
94 |
95 | $previous = $scalar_func(firstx($vec));

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/c/select.php:137:5
135 | FUNCTION,
136 | );
[1] 137 | /* HH_IGNORE_ERROR[4110] invariant above implies this is T */
138 | return $first_value;
139 | }

Typing[4110] Invalid return type [1]
-> Expected T [2]
-> But got null from this is expression test [3]

vendor/hhvm/hsl/src/c/select.php:138:12
124 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\Traversable::class)>>
125 | Traversable $traversable,
[2] 126 | ): T {
127 | if ($traversable is Container<_>) {
128 | $first_value = _Private\Native\first($traversable);
[3] 129 | if ($first_value is nonnull) {
130 | return $first_value;
131 | }
:
136 | );
137 | /* HH_IGNORE_ERROR[4110] invariant above implies this is T */
[1] 138 | return $first_value;
139 | }
140 | foreach ($traversable as $value) {

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/c/select.php:251:5
249 | FUNCTION,
250 | );
[1] 251 | /* HH_IGNORE_ERROR[4110] invariant above implies this is T */
252 | return $last_value;
253 | }

Typing[4110] Invalid return type [1]
-> Expected T [2]
-> But got null from this is expression test [3]

vendor/hhvm/hsl/src/c/select.php:252:12
238 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\Traversable::class)>>
239 | Traversable $traversable,
[2] 240 | ): T {
241 | if ($traversable is Container<_>) {
242 | $last_value = _Private\Native\last($traversable);
[3] 243 | if ($last_value is nonnull) {
244 | return $last_value;
245 | }
:
250 | );
251 | /* HH_IGNORE_ERROR[4110] invariant above implies this is T */
[1] 252 | return $last_value;
253 | }
254 | $value = null;

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/c/select.php:260:3
258 | }
259 | invariant($did_iterate, '%s: Expected at least one element.', FUNCTION);
[1] 260 | /* HH_IGNORE_ERROR[4110] invariant above implies this is T */
261 | return $value;
262 | }

Typing[4110] Invalid return type [1]
-> Expected T [2]
-> But got ?T [3]

vendor/hhvm/hsl/src/c/select.php:261:10
238 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\Traversable::class)>>
239 | Traversable $traversable,
[2] 240 | ): T {
241 | if ($traversable is Container<_>) {
242 | $last_value = _Private\Native\last($traversable);
:
252 | return $last_value;
253 | }
[3] 254 | $value = null;
255 | $did_iterate = false;
256 | foreach ($traversable as $value) {
:
259 | invariant($did_iterate, '%s: Expected at least one element.', FUNCTION);
260 | /* HH_IGNORE_ERROR[4110] invariant above implies this is T */
[1] 261 | return $value;
262 | }
263 |

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/c/select.php:320:3
318 | }
319 | invariant($did_iterate, '%s: Expected at least one element.', FUNCTION);
[1] 320 | /* HH_IGNORE_ERROR[4110] invariant above implies this is Tk */
321 | return $key;
322 | }

Typing[4110] Invalid return type [1]
-> Expected Tk [2]
-> But got ?Tk [3]

vendor/hhvm/hsl/src/c/select.php:321:10
302 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\KeyedTraversable::class)>>
303 | KeyedTraversable<Tk, Tv> $traversable,
[2] 304 | ): Tk {
305 | if ($traversable is KeyedContainer<_, _>) {
306 | $last_key = Private\Native\last_key($traversable);
:
312 | return $last_key;
313 | }
[3] 314 | $key = null;
315 | $did_iterate = false;
316 | foreach ($traversable as $key => $
) {
:
319 | invariant($did_iterate, '%s: Expected at least one element.', FUNCTION);
320 | /* HH_IGNORE_ERROR[4110] invariant above implies this is Tk */
[1] 321 | return $key;
322 | }
323 |

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/c/select.php:393:3
391 | : \vsprintf($format_string, $format_args),
392 | );
[1] 393 | /* HH_IGNORE_ERROR[4110] $first is false implies $result is set to T */
394 | return $result;
395 | }

Typing[4110] Invalid return type [1]
-> Expected T [2]
-> But got ?T [3]

vendor/hhvm/hsl/src/c/select.php:394:10
359 | ?Str\SprintfFormatString $format_string = null,
360 | mixed ...$format_args
[2] 361 | ): T {
362 | $first = true;
[3] 363 | $result = null;
364 | foreach ($traversable as $value) {
365 | invariant(
:
392 | );
393 | /* HH_IGNORE_ERROR[4110] $first is false implies $result is set to T */
[1] 394 | return $result;
395 | }

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/dict/async.php:30:3
28 | $awaitables_[$key] = \HH\Asio\result($value);
29 | }
[1] 30 | /* HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */
31 | return $awaitables_;
32 | }

Typing[4110] Invalid return type [1]
-> Expected Tv [2]
-> But got Awaitable [3]

vendor/hhvm/hsl/src/dict/async.php:31:10
20 | /
21 | async function from_async<Tk as arraykey, Tv>(
[3] 22 | KeyedTraversable<Tk, Awaitable> $awaitables,
[2] 23 | ): Awaitable<dict<Tk, Tv>> {
24 | $awaitables_ = dict($awaitables);
25 |
:
29 | }
30 | /
HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */
[1] 31 | return $awaitables_;
32 | }
33 |

Typing[4135] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4135 [1]

vendor/hhvm/hsl/src/dict/async.php:55:3
53 | $awaitables[$key] ??= $async_func($key);
54 | }
[1] 55 | /* HH_IGNORE_ERROR[4135] Unset local variable to reduce peak memory. */
56 | unset($keys);
57 |

Typing[4135] In strict mode, unset is banned except on dynamic, darray, keyset, or dict indexing [1]

vendor/hhvm/hsl/src/dict/async.php:56:3
54 | }
55 | /* HH_IGNORE_ERROR[4135] Unset local variable to reduce peak memory. /
[1] 56 | unset($keys);
57 |
58 | /
HH_FIXME[4200] Hide the magic from reactivity */

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/dict/async.php:64:3
62 | $awaitables[$key] = \HH\Asio\result($value);
63 | }
[1] 64 | /* HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */
65 | return $awaitables;
66 | }

Typing[4110] Invalid return type [1]
-> Expected Tv [2]
-> But got Awaitable [3]

vendor/hhvm/hsl/src/dict/async.php:65:10
46 | Traversable $keys,
47 | <<__AtMostRxAsFunc>>
[3] 48 | (function(Tk): Awaitable) $async_func,
[2] 49 | ): Awaitable<dict<Tk, Tv>> {
50 | $awaitables = dict[];
51 | foreach ($keys as $key) {
:
63 | }
64 | /* HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */
[1] 65 | return $awaitables;
66 | }
67 |

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/dict/async.php:142:3
140 | }
141 |
[1] 142 | /* HH_IGNORE_ERROR[4110] Okay to pass in Awaitable /
143 | /
HH_FIXME[4200] Hide the magic from reactivity */
144 | await AwaitAllWaitHandle::fromDict($dict);

Typing[4110] Invalid argument [1]
-> Expected Awaitable [2]
-> But got Tv1 [3]

vendor/hhvm/hsl/src/dict/async.php:144:38
130 | async function map_async<Tk as arraykey, Tv1, Tv2>(
131 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\KeyedTraversable::class)>>
[3] 132 | KeyedTraversable<Tk, Tv1> $traversable,
133 | <<__AtMostRxAsFunc>>
134 | (function(Tv1): Awaitable) $value_func,
:
142 | /* HH_IGNORE_ERROR[4110] Okay to pass in Awaitable /
143 | /
HH_FIXME[4200] Hide the magic from reactivity /
[1] 144 | await AwaitAllWaitHandle::fromDict($dict);
145 | foreach ($dict as $key => $value) {
146 | /
HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */

/tmp/hh_server/hhi_3146af37/classes.hhi:160:20
158 | ): Awaitable;
159 | public static function fromDict(
[2] 160 | dict<arraykey, Awaitable> $deps
161 | ): Awaitable;
162 | public static function fromMap(

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/dict/async.php:146:5
144 | await AwaitAllWaitHandle::fromDict($dict);
145 | foreach ($dict as $key => $value) {
[1] 146 | /* HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. /
147 | /
HH_FIXME[4200] Hide the magic from reactivity */
148 | $dict[$key] = \HH\Asio\result($value);

Typing[4110] Invalid argument [1]
-> Expected Awaitable<[unresolved]> [2]
-> But got Tv1 [3]

vendor/hhvm/hsl/src/dict/async.php:148:35
130 | async function map_async<Tk as arraykey, Tv1, Tv2>(
131 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\KeyedTraversable::class)>>
[3] 132 | KeyedTraversable<Tk, Tv1> $traversable,
133 | <<__AtMostRxAsFunc>>
134 | (function(Tv1): Awaitable) $value_func,
:
146 | /* HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. /
147 | /
HH_FIXME[4200] Hide the magic from reactivity /
[1] 148 | $dict[$key] = \HH\Asio\result($value);
149 | }
150 | /
HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */

/tmp/hh_server/hhi_3146af37/stdlib/builtins_asio.hhi:17:22
15 | namespace HH\Asio {
16 | function join(Awaitable $awaitable): T;
[2] 17 | function result(Awaitable $awaitable): T;
18 | function name(Awaitable $awaitable): string;
19 | function has_finished(Awaitable $awaitable): bool;

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/dict/async.php:150:3
148 | $dict[$key] = \HH\Asio\result($value);
149 | }
[1] 150 | /* HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */
151 | return $dict;
152 | }

Typing[4110] Invalid return type [1]
-> Expected Tv2 [2]
-> But got Tv1 [3]

vendor/hhvm/hsl/src/dict/async.php:151:10
130 | async function map_async<Tk as arraykey, Tv1, Tv2>(
131 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\KeyedTraversable::class)>>
[3] 132 | KeyedTraversable<Tk, Tv1> $traversable,
133 | <<__AtMostRxAsFunc>>
134 | (function(Tv1): Awaitable) $value_func,
[2] 135 | ): Awaitable<dict<Tk, Tv2>> {
136 | $dict = dict($traversable);
137 | foreach ($dict as $key => $value) {
:
149 | }
150 | /* HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */
[1] 151 | return $dict;
152 | }
153 |

Typing[4135] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4135 [1]

vendor/hhvm/hsl/src/dict/async.php:174:3
172 | $async_func,
173 | );
[1] 174 | /* HH_IGNORE_ERROR[4135] Unset local variable to reduce peak memory. /
175 | unset($container);
176 | /
HH_FIXME[4200] Hide the magic from reactivity */

Typing[4135] In strict mode, unset is banned except on dynamic, darray, keyset, or dict indexing [1]

vendor/hhvm/hsl/src/dict/async.php:175:3
173 | );
174 | /* HH_IGNORE_ERROR[4135] Unset local variable to reduce peak memory. /
[1] 175 | unset($container);
176 | /
HH_FIXME[4200] Hide the magic from reactivity */
177 | await AwaitAllWaitHandle::fromDict($awaitables);

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/dict/async.php:182:3
180 | $awaitables[$index] = \HH\Asio\result($value);
181 | }
[1] 182 | /* HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */
183 | return $awaitables;
184 | }

Typing[4110] Invalid return type [1]
-> Expected Tv2 [2]
-> But got Awaitable [3]

vendor/hhvm/hsl/src/dict/async.php:183:10
166 | KeyedTraversable<Tk, Tv1> $container,
167 | <<__AtMostRxAsFunc>>
[3] 168 | (function(Tk, Tv1): Awaitable) $async_func
[2] 169 | ): Awaitable<dict<Tk, Tv2>> {
170 | $awaitables = Dict\map_with_key(
171 | $container,
:
181 | }
182 | /* HH_IGNORE_ERROR[4110] Reuse the existing dict to reduce peak memory. */
[1] 183 | return $awaitables;
184 | }

Typing[4240] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4240 [1]

vendor/hhvm/hsl/src/dict/order.php:109:5
107 | $tuple_comparator = $scalar_comparator
108 | ? ((Ts, Tv) $a, (Ts, Tv) $b) ==> $scalar_comparator($a[0], $b[0])
[1] 109 | /* HH_FIXME[4240] need Scalar type */
110 | : ((Ts, Tv) $a, (Ts, Tv) $b) ==> $a[0] <=> $b[0];
111 | return $traversable

Typing[4240] This comparison has invalid types. Only comparisons in which both arguments are strings, nums, DateTime, or DateTimeImmutable are allowed [1]
-> This is a value of generic type Ts [2]
-> This is a value of generic type Ts [3]

vendor/hhvm/hsl/src/dict/order.php:110:38
108 | ? ((Ts, Tv) $a, (Ts, Tv) $b) ==> $scalar_comparator($a[0], $b[0])
109 | /* HH_FIXME[4240] need Scalar type */
[1,2,3] 110 | : ((Ts, Tv) $a, (Ts, Tv) $b) ==> $a[0] <=> $b[0];
111 | return $traversable
112 | |> map($$, $v ==> tuple($scalar_func($v), $v))

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/math/compute.php:27:3
25 | <<__Rx>>
26 | function abs(T $number): T {
[1] 27 | /* HH_FIXME[4110]: This returns a num, which may be a supertype of T */
28 | return $number < 0 ? -$number : $number;
29 | }

Typing[4110] Invalid return type [1]
-> Expected T [2]
-> But got num because this is the result of an arithmetic operation with a num as the only argument, and no floats. [3]
-> Here is why I think the argument is a num: this is a num [4]

vendor/hhvm/hsl/src/math/compute.php:28:10
24 | /
25 | <<__Rx>>
[2,4] 26 | function abs(T $number): T {
27 | /
HH_FIXME[4110]: This returns a num, which may be a supertype of T */
[1,3] 28 | return $number < 0 ? -$number : $number;
29 | }
30 |

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/regex/exception.php:29:9
27 | "%s: %s",
28 | idx($errors, $code, 'Invalid pattern'),
[1] 29 | /* HH_FIXME[4110] Until we have a to_string() function */
30 | $pattern,
31 | ),

Typing[4110] Invalid argument [1]
-> Expected string because of the %s format specifier [2]
-> But got mixed arising from an implicit as ?nonnull constraint on this type [3]

vendor/hhvm/hsl/src/regex/exception.php:30:9
15 | final class Exception extends \Exception {
16 | <<__Rx>>
[3] 17 | public function __construct(Pattern $pattern, int $code): void {
18 | $errors = dict[
19 | \PREG_INTERNAL_ERROR => 'Internal error',
:
25 | parent::__construct(
26 | Str\format(
[2] 27 | "%s: %s",
28 | idx($errors, $code, 'Invalid pattern'),
29 | /* HH_FIXME[4110] Until we have a to_string() function */
[1] 30 | $pattern,
31 | ),
32 | );

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/regex/private.php:45:5
43 | /* HH_IGNORE_ERROR[4200] Rx error without deregister_phpstdlib /
44 | $status = \preg_match_with_matches(
[1] 45 | /
HH_IGNORE_ERROR[4110] */ $pattern,
46 | $haystack,
47 | inout $match,

Typing[4110] Invalid argument [1]
-> Expected string [2]
-> But got mixed arising from an implicit as ?nonnull constraint on this type [3]

vendor/hhvm/hsl/src/regex/private.php:45:33
32 | function regex_match<T as Regex\Match>(
33 | string $haystack,
[3] 34 | Regex\Pattern $pattern,
35 | int $offset = 0,
36 | ): ?(T, int) {
:
43 | /* HH_IGNORE_ERROR[4200] Rx error without deregister_phpstdlib /
44 | $status = \preg_match_with_matches(
[1] 45 | /
HH_IGNORE_ERROR[4110] */ $pattern,
46 | $haystack,
47 | inout $match,

/tmp/hh_server/hhi_3146af37/stdlib/builtins_preg.hhi:41:34
39 | ): int;
40 | <<__PHPStdLib>> // not pure: puts error code in a global variable
[2] 41 | function preg_match_with_matches(string $pattern, string $subject, inout $matches,
42 | int $flags = 0, int $offset = 0): int;
43 | <<__PHPStdLib, __Pure>>

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/regex/private.php:59:5
57 | }
58 | $offset_out = $match[0][1];
[1] 59 | /* HH_FIXME[4110] Native function won't have this problem */
60 | return tuple($match_out, $offset_out);
61 | } else if ($status === 0) {

Typing[4110] Invalid return type [1]
-> Expected T [2]
-> But got darray<_, _> [3]

vendor/hhvm/hsl/src/regex/private.php:60:12
34 | Regex\Pattern $pattern,
35 | int $offset = 0,
[2] 36 | ): ?(T, int) {
37 | /* HH_IGNORE_ERROR[4200] keep suppressing warnings from bad callers /
38 | using new PHPWarningSuppressor();
:
52 | );
53 | if ($status === 1) {
[3] 54 | $match_out = darray[];
55 | foreach ($match as $key => $value) {
56 | $match_out[$key] = $value[0];
57 | }
58 | $offset_out = $match[0][1];
59 | /
HH_FIXME[4110] Native function won't have this problem */
[1] 60 | return tuple($match_out, $offset_out);
61 | } else if ($status === 0) {
62 | return null;

Typing[4108] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4108 [1]

vendor/hhvm/hsl/src/regex/regex.php:57:5
55 | $result[] = $captures;
56 | $match_begin = $match[1];
[1] 57 | /* HH_FIXME[4108] Until we can define Match to have field 0 */
58 | $match_length = Str\length($captures[0]);
59 | if ($match_length === 0) {

Typing[4108] The field 0 is undefined [1]
-> Definition is here [2]

vendor/hhvm/hsl/src/regex/regex.php:58:42
40 | /
41 | <<__Rx>>
[2] 42 | function every_match(
43 | string $haystack,
44 | Pattern $pattern,
:
56 | $match_begin = $match[1];
57 | /
HH_FIXME[4108] Until we can define Match to have field 0 */
[1] 58 | $match_length = Str\length($captures[0]);
59 | if ($match_length === 0) {
60 | $offset = $match_begin + 1;

Typing[4108] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4108 [1]

vendor/hhvm/hsl/src/regex/regex.php:147:5
145 | $result .= Str\slice($haystack, $match_end, $match_begin - $match_end);
146 | $result .= $replace_func($captures);
[1] 147 | /* HH_FIXME[4108] Until we can define Match to have field 0 */
148 | $match_length = Str\length($captures[0]);
149 | $match_end = $match_begin + $match_length;

Typing[4108] The field 0 is undefined [1]
-> Definition is here [2]

vendor/hhvm/hsl/src/regex/regex.php:148:42
126 | /
127 | <<__Rx, __AtMostRxAsArgs>>
[2] 128 | function replace_with(
129 | string $haystack,
130 | Pattern $pattern,
:
146 | $result .= $replace_func($captures);
147 | /
HH_FIXME[4108] Until we can define Match to have field 0 */
[1] 148 | $match_length = Str\length($captures[0]);
149 | $match_end = $match_begin + $match_length;
150 | if ($match_length === 0) {

Typing[4108] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4108 [1]

vendor/hhvm/hsl/src/regex/regex.php:200:5
198 | // Copy anything between the previous match and this one
199 | $result[] = Str\slice($haystack, $match_end, $match_begin - $match_end);
[1] 200 | /* HH_FIXME[4108] Until we can define Match to have field 0 */
201 | $match_length = Str\length($captures[0]);
202 | $match_end = $match_begin + $match_length;

Typing[4108] The field 0 is undefined [1]
-> Definition is here [2]

vendor/hhvm/hsl/src/regex/regex.php:201:42
176 | function split(
177 | string $haystack,
[2] 178 | Pattern $delimiter,
179 | ?int $limit = null,
180 | ): vec {
:
199 | $result[] = Str\slice($haystack, $match_end, $match_begin - $match_end);
200 | /* HH_FIXME[4108] Until we can define Match to have field 0 */
[1] 201 | $match_length = Str\length($captures[0]);
202 | $match_end = $match_begin + $match_length;
203 | if ($match_length === 0) {

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/vec/async.php:31:3
29 | $vec[$index] = \HH\Asio\result($value);
30 | }
[1] 31 | /* HH_IGNORE_ERROR[4110] Reuse the existing vec to reduce peak memory. */
32 | return $vec;
33 | }

Typing[4110] Invalid return type [1]
-> Expected Tv [2]
-> But got Awaitable [3]

vendor/hhvm/hsl/src/vec/async.php:32:10
21 | /
22 | async function from_async(
[3] 23 | Traversable<Awaitable> $awaitables,
[2] 24 | ): Awaitable<vec> {
25 | $vec = vec($awaitables);
26 |
:
30 | }
31 | /
HH_IGNORE_ERROR[4110] Reuse the existing vec to reduce peak memory. */
[1] 32 | return $vec;
33 | }
34 |

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/vec/async.php:92:3
90 | }
91 |
[1] 92 | /* HH_IGNORE_ERROR[4110] Okay to pass in Awaitable /
93 | /
HH_FIXME[4200] Hide the magic from reactivity */
94 | await AwaitAllWaitHandle::fromVec($vec);

Typing[4110] Invalid argument [1]
-> Expected Awaitable [2]
-> But got Tv1 [3]

vendor/hhvm/hsl/src/vec/async.php:94:37
80 | async function map_async<Tv1, Tv2>(
81 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\Traversable::class)>>
[3] 82 | Traversable $traversable,
83 | <<__AtMostRxAsFunc>>
84 | (function(Tv1): Awaitable) $async_func,
:
92 | /* HH_IGNORE_ERROR[4110] Okay to pass in Awaitable /
93 | /
HH_FIXME[4200] Hide the magic from reactivity /
[1] 94 | await AwaitAllWaitHandle::fromVec($vec);
95 | foreach ($vec as $index => $value) {
96 | /
HH_IGNORE_ERROR[4110] Reuse the existing vec to reduce peak memory. */

/tmp/hh_server/hhi_3146af37/classes.hhi:166:9
164 | ): Awaitable;
165 | public static function fromVec(
[2] 166 | vec<Awaitable> $deps
167 | ): Awaitable;
168 | public static function fromVector(

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/vec/async.php:96:5
94 | await AwaitAllWaitHandle::fromVec($vec);
95 | foreach ($vec as $index => $value) {
[1] 96 | /* HH_IGNORE_ERROR[4110] Reuse the existing vec to reduce peak memory. /
97 | /
HH_FIXME[4200] Hide the magic from reactivity */
98 | $vec[$index] = \HH\Asio\result($value);

Typing[4110] Invalid argument [1]
-> Expected Awaitable<[unresolved]> [2]
-> But got Tv1 [3]

vendor/hhvm/hsl/src/vec/async.php:98:36
80 | async function map_async<Tv1, Tv2>(
81 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\Traversable::class)>>
[3] 82 | Traversable $traversable,
83 | <<__AtMostRxAsFunc>>
84 | (function(Tv1): Awaitable) $async_func,
:
96 | /* HH_IGNORE_ERROR[4110] Reuse the existing vec to reduce peak memory. /
97 | /
HH_FIXME[4200] Hide the magic from reactivity /
[1] 98 | $vec[$index] = \HH\Asio\result($value);
99 | }
100 | /
HH_IGNORE_ERROR[4110] Reuse the existing vec to reduce peak memory. */

/tmp/hh_server/hhi_3146af37/stdlib/builtins_asio.hhi:17:22
15 | namespace HH\Asio {
16 | function join(Awaitable $awaitable): T;
[2] 17 | function result(Awaitable $awaitable): T;
18 | function name(Awaitable $awaitable): string;
19 | function has_finished(Awaitable $awaitable): bool;

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110 [1]

vendor/hhvm/hsl/src/vec/async.php:100:3
98 | $vec[$index] = \HH\Asio\result($value);
99 | }
[1] 100 | /* HH_IGNORE_ERROR[4110] Reuse the existing vec to reduce peak memory. */
101 | return $vec;
102 | }

Typing[4110] Invalid return type [1]
-> Expected Tv2 [2]
-> But got Tv1 [3]

vendor/hhvm/hsl/src/vec/async.php:101:10
80 | async function map_async<Tv1, Tv2>(
81 | <<__MaybeMutable, __OnlyRxIfImpl(\HH\Rx\Traversable::class)>>
[3] 82 | Traversable $traversable,
83 | <<__AtMostRxAsFunc>>
84 | (function(Tv1): Awaitable) $async_func,
[2] 85 | ): Awaitable<vec> {
86 | $vec = vec($traversable);
87 | foreach ($vec as $i => $value) {
:
99 | }
100 | /* HH_IGNORE_ERROR[4110] Reuse the existing vec to reduce peak memory. */
[1] 101 | return $vec;
102 | }

68 errors found.

Ooh, I see. These are caused by a recent HHVM change that requires explicitly listing all allowed error codes in your .hhconfig file.

You can fix it by copying the last 2 lines from the Hack Standard Library's .hhconfig here: https://github.com/hhvm/hsl/blob/master/.hhconfig#L8

The HHVM change is documented here: https://hhvm.com/blog/2020/06/16/hhvm-4.62.html

But it looks like we forgot to update the documentation (thanks for reporting it!)

Looks like we already have hhvm/user-documentation#905 open to update the documentation, so closing this one