This is an archive of the discontinued LLVM Phabricator instance.

Fixes to make arcanist compatible with php8.1 on Linux
AbandonedPublic

Authored by hiraditya on Aug 23 2022, 7:32 PM.

Details

Summary

php8.1

  • introduced strict type checking and error reporting
  • removed deprecated APIs

Also has changes suggested in:
https://discourse.llvm.org/t/arcanist-deprecation-errors-on-php-8/63231

PR: https://github.com/llvm/llvm-project/issues/57271

Testing:

sh
cd /usr/share/arcanist
patch -p1 < /path/to/llvm-project/llvm/utils/phabricator/0001-Fix-PHP-8.1-incompatibility-with-arc-patch-D-12345.patch
patch -p1 < https://reviews.llvm.org/file/data/ck5dddpgtnurs5jjivr2/PHID-FILE-krs7drhq43t4p7jciltf/D131699.diff
patch -p1 < https://reviews.llvm.org/file/data/2g2fs6frlcha5cglbdns/PHID-FILE-laajtlfzcpnharrrp7un/D132523.diff

arc diff

Diff Detail

Event Timeline

hiraditya created this revision.Aug 23 2022, 7:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2022, 7:32 PM
hiraditya requested review of this revision.Aug 23 2022, 7:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2022, 7:32 PM
hiraditya updated this revision to Diff 455050.Aug 23 2022, 7:36 PM

Adding more fixes.

hiraditya updated this revision to Diff 455053.Aug 23 2022, 7:57 PM

Added all the changes

hiraditya edited the summary of this revision. (Show Details)Aug 23 2022, 7:58 PM
hiraditya added reviewers: stellaraccident, fhahn.
hiraditya edited the summary of this revision. (Show Details)
hiraditya edited the summary of this revision. (Show Details)
hiraditya edited the summary of this revision. (Show Details)Aug 23 2022, 8:04 PM
hiraditya updated this revision to Diff 455057.Aug 23 2022, 8:18 PM

Make it git compatible.

Does the description in phab need updating? It suggests multiple invocations of patch?

Does the description in phab need updating? It suggests multiple invocations of patch?

Yes. The instructions were for anyone to try this patch while in review.

I guess once https://reviews.llvm.org/D131699 is merged, i'll update the description.

pmatos added a subscriber: pmatos.Sep 9 2022, 4:30 AM

Thanks for this. I needed this patch for arc to work again.

nickdesaulniers requested changes to this revision.Sep 29 2022, 10:39 AM

The resulting patch fails to apply to arcanist for me. STR:

$ cd llvm-project
$ wget https://reviews.llvm.org/file/data/nrt6tovpa573cdwctpyc/PHID-FILE-kgufiuwoyczdbfqdezq5/D132523.diff
$ git apply D132523.diff
$ cd arcanist
$ git am /android0/llvm-project/llvm/utils/phabricator/*.patch
Applying: Fix PHP 8.1 incompatibility with `arc patch D<12345>`
Applying: Fixes to make arcanist compatible with php8.1
error: patch failed: src/error/PhutilErrorHandler.php:180
error: src/error/PhutilErrorHandler.php: patch does not apply
error: patch failed: src/lint/engine/ArcanistLintEngine.php:274
error: src/lint/engine/ArcanistLintEngine.php: patch does not apply
error: patch failed: src/lint/linter/ArcanistLinter.php:291
error: src/lint/linter/ArcanistLinter.php: patch does not apply
error: patch failed: src/moduleutils/PhutilLibraryMapBuilder.php:122
error: src/moduleutils/PhutilLibraryMapBuilder.php: patch does not apply
error: patch failed: src/object/Phobject.php:33
error: src/object/Phobject.php: patch does not apply
error: patch failed: src/parser/PhutilTypeSpec.php:76
error: src/parser/PhutilTypeSpec.php: patch does not apply
error: patch failed: src/unit/engine/phutil/PhutilTestCase.php:408
error: src/unit/engine/phutil/PhutilTestCase.php: patch does not apply
error: patch failed: src/utils/PhutilArray.php:29
error: src/utils/PhutilArray.php: patch does not apply
error: patch failed: src/utils/utils.php:2003
error: src/utils/utils.php: patch does not apply
error: patch failed: src/workflow/ArcanistWorkflow.php:728
error: src/workflow/ArcanistWorkflow.php: patch does not apply
Patch failed at 0002 Fixes to make arcanist compatible with php8.1
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

This patch needs to be able to be applied on top of llvm/utils/phabricator/0001-Fix-PHP-8.1-incompatibility-with-arc-patch-D-12345.patch.

This revision now requires changes to proceed.Sep 29 2022, 10:39 AM
hiraditya abandoned this revision.May 24 2023, 2:22 PM

not needed anymore.