hh_client报告软件包错误 [英] hh_client reports errors on package

查看:63
本文介绍了hh_client报告软件包错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照入门在Hacklang官方网站上.

I am following the instruction in Getting started on official Hacklang website.

它说,我跑:

$ touch .hhconfig
$ mkdir bin src tests
$ cat > hh_autoload.json
{
  "roots": [
    "src/"
  ],
  "devRoots": [
    "tests/"
  ],
  "devFailureHandler": "Facebook\\AutoloadMap\\HHClientFallbackHandler"
}
$ composer require hhvm/hsl hhvm/hhvm-autoload

然后我运行 hh_client ,它会引发如下74个错误:

Then I run hh_client, which throws 74 errors like those:

Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110
   --> vendor/autoload.hack
318 |   \HH\autoload_set_paths(/* HH_FIXME[4110] incorrect hhi */ $map, Generated\root());
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Typing[4110] Invalid argument
   --> vendor/autoload.hack
318 |   \HH\autoload_set_paths(/* HH_FIXME[4110] incorrect hhi */ $map, Generated\root());
    |                                                             ^^^^
   --> /private/tmp/hh_server/hhi_3f14b466/functions.hhi
 82 |     KeyedContainer<string, KeyedContainer<string, string>> $map,
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected KeyedContainer<string, string>
   --> vendor/hhvm/hhvm-autoload/src/FailureHandler.hack
 46 |   final public function handleFailure(string $kind, string $name): void {
    |                         ^^^^^^^^^^^^^ But got (function(string $kind, string $name): void)

Naming[2050] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 2050
   --> vendor/bin/hh-autoload.hack
179 |   GenerateScript::main(vec(/* HH_IGNORE_ERROR[2050] */ $GLOBALS['argv']));
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^

...

这些错误与通过composer安装的hh_autoload和hsl软件包有关.

Those errors are related to hh_autoload and hsl package installed through composer.

为什么?

推荐答案

最近有Hack类型检查器( )已从默认允许"更改为默认禁止".

The Hack typechecker recently (as of HHVM 4.62) changed from 'allow by default' to 'ban by default' for error codes in HH_FIXME comments.

尝试将其添加到您的 .hhconfig :

allowed_fixme_codes_strict = 2050, 4110

这篇关于hh_client报告软件包错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆