hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Update Exception::__construct($previous)

Open lexidor opened this issue 2 years ago • 11 comments

The type should be nullable Throwable since 4.162.0. There may have been good reasons for leaving it though...

lexidor avatar Jun 09 '22 17:06 lexidor

Fixes #8239

lexidor avatar Jun 09 '22 17:06 lexidor

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Jun 09 '22 17:06 facebook-github-bot

https://github.com/facebook/hhvm/blob/e8ffdc22c2e50a8cbb8be312718116a46dee8476/hphp/hack/hhi/exceptions.hhi#L97 is definitely wrong!

lexidor avatar Jun 09 '22 17:06 lexidor

@lexidor has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Jun 09 '22 17:06 facebook-github-bot

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Jun 09 '22 19:06 facebook-github-bot

Some test failures:

hphp/hack/test/tast/contravariant_solve.php hphp/hack/test/tast/finally.php hphp/hack/test/tast/reactive.php hphp/hack/test/tast/control_flow/do_throw_while.php hphp/hack/test/tast/control_flow/while_throw.php hphp/hack/test/tast/re_prefixed_string/re_prefixed_string.php

Atry avatar Jun 09 '22 19:06 Atry

@lexidor Feel free to rebase this PR onto master to see the test result from GitHub Actions recently added.

Atry avatar Jul 07 '22 20:07 Atry

Close and reopen this PR to trigger the CI

Atry avatar Jul 12 '22 00:07 Atry

Ah, the tast contains a a lot of explicit dumps of the signatures. So the test fails because the expect file contains

function(string=, int=, ?\Exception=)

I'll rebase and try to get my local test suite running. That should find all the places where the sig is included in some expect output.

lexidor avatar Jul 12 '22 05:07 lexidor

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Jul 12 '22 17:07 facebook-github-bot

The CI on GitHub Actions passes because it runs the quick tests only, not the full set of tests. https://github.com/facebook/hhvm/blob/e25051f8e9e824966ac7898715411e58a0f21659/flake.nix#L35

Atry avatar Jul 12 '22 17:07 Atry

This PR is stale and conflicts with HEAD. Closing.

lexidor avatar Jun 11 '23 19:06 lexidor