Bug 233223

Summary: devel/arcanist: Exception when using "arc diff --create"
Product: Ports & Packages Reporter: Mateusz Piotrowski <0mp>
Component: Individual Port(s)Assignee: Michael Gmelin <grembo>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: bwidawsk, phabric-admin, w.schwarzenfeld
Priority: --- Keywords: needs-patch
Version: LatestFlags: bugzilla: maintainer-feedback? (grembo)
Hardware: Any   
OS: Any   

Description Mateusz Piotrowski freebsd_committer freebsd_triage 2018-11-14 14:44:49 UTC
I'm getting the following error message when invoking "arc diff --create contrib/smbfs/smbutil/smbutil.1":

```
Linting...
 Exception
Error while loading file "/usr/local/lib/php/arcanist/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php": "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
(Run with `--trace` for a full exception trace.)
```

It happens when I use arcanist-php73-20180420_1. This problem does not arise when I use arcanist-php56-20180420_1.
Comment 1 Ben Widawsky freebsd_committer freebsd_triage 2018-11-18 01:01:22 UTC
Here's the interesting part of the trace:
"new-commit" 24L, 670C written
<<< [12] <exec> 1,698,254 us
>>> [13] <http> https://reviews.freebsd.org/api/differential.parsecommitmessage
<<< [13] <http> 183,306 us
>>> [14] <conduit> user.query() <bytes = 215>
>>> [15] <http> https://reviews.freebsd.org/api/user.query
<<< [15] <http> 164,000 us
<<< [14] <conduit> 164,084 us
>>> [16] <event> diff.didBuildMessage <listeners = 0>
<<< [16] <event> 17 us
Linting...
>>> [17] <exec> $ git rev-parse 'HEAD'
<<< [17] <exec> 5,235 us
>>> [18] <exec> $ git merge-base 'ad3b11383dd8dedf924c60ea9c2ad2e3b4ca0a5c' '8fd74acdded974c2d5ccd3196875950413ff2392'
<<< [18] <exec> 5,967 us
>>> [19] <exec> $ git diff --no-ext-diff --no-textconv --submodule=short --raw 'ad3b11383dd8dedf924c60ea9c2ad2e3b4ca0a5c' HEAD --
<<< [19] <exec> 8,245 us
>>> [20] <exec> $ git diff --no-ext-diff --no-textconv --submodule=short --no-color --src-prefix=a/ --dst-prefix=b/ -U32767 -M -C 'ad3b11383dd8dedf924c60ea9c2ad2e3b4ca0a5c' --
<<< [20] <exec> 319,553 us

[2018-11-18 00:55:55] EXCEPTION: (Exception) Error while loading file "/usr/local/lib/php/arcanist/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php": "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? at [<phutil>/src/moduleutils/PhutilBootloader.php:273]
arcanist(), phutil()
  #0 PhutilBootloader::executeInclude(string) called at [<phutil>/src/moduleutils/PhutilBootloader.php:213]
  #1 PhutilBootloader::loadLibrarySource(string, string) called at [<phutil>/src/symbols/PhutilSymbolLoader.php:381]
  #2 PhutilSymbolLoader::loadSymbol(array) called at [<phutil>/src/symbols/PhutilSymbolLoader.php:256]
  #3 PhutilSymbolLoader::selectAndLoadSymbols() called at [<phutil>/src/symbols/PhutilSymbolLoader.php:324]
  #4 PhutilClassMapQuery::execute() called at [<arcanist>/src/lint/linter/xhpast/ArcanistXHPASTLinterRule.php:15]
  #5 ArcanistXHPASTLinterRule::loadAllRules() called at [<arcanist>/src/lint/linter/ArcanistXHPASTLinter.php:14]
  #6 ArcanistXHPASTLinter::__construct()
  #7 ReflectionClass::newInstance() called at [<phutil>/src/utils/utils.php:748]
  #8 newv(string, array) called at [<phutil>/src/symbols/PhutilSymbolLoader.php:328]
  #9 PhutilSymbolLoader::loadObjects() called at [<phutil>/src/symbols/PhutilClassMapQuery.php:239]
  #10 PhutilClassMapQuery::loadMap() called at [<phutil>/src/symbols/PhutilClassMapQuery.php:179]
  #11 PhutilClassMapQuery::execute() called at [<arcanist>/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php:143]
  #12 ArcanistConfigurationDrivenLintEngine::loadAvailableLinters() called at [<arcanist>/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php:32]
  #13 ArcanistConfigurationDrivenLintEngine::buildLinters() called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:166]
  #14 ArcanistLintEngine::run() called at [<arcanist>/src/workflow/ArcanistLintWorkflow.php:337]
  #15 ArcanistLintWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1250]
  #16 ArcanistDiffWorkflow::runLint() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1211]
  #17 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:483]
  #18 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]
Comment 2 Michael Gmelin freebsd_committer freebsd_triage 2018-12-31 00:34:54 UTC
I just updated the ports to a more recent version (see
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233183).

Could you please re-test and see if this helps?

This might also be specific to the project's installation of phabricator or they might be able to assist, hence I'm adding them to the PR.
Comment 3 Michael Gmelin freebsd_committer freebsd_triage 2018-12-31 00:35:40 UTC
(In reply to Michael Gmelin from comment #2)

See

https://svnweb.freebsd.org/ports?view=revision&revision=488751

for version 20181231 of the phabricator ports.
Comment 4 Walter Schwarzenfeld freebsd_triage 2019-08-08 13:17:59 UTC
Version 20181231 is in the port. Does the problem still exist?
Comment 5 Mateusz Piotrowski freebsd_committer freebsd_triage 2019-08-08 13:26:57 UTC
It's working now.