[PATCH] D77363: Use git-clang-format as Arcanist linter

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 02:07:28 PDT 2020


vitalybuka added a comment.

This does not work for me

  arc patch D77374 # Applies two patches D77373 D77374
  arc diff --trace # fails
  
  # It works with just one D77373 in the branch, but fails with both patches.
  # .git/index.lock does not exist before and after "arc diff"



   ARGV  /usr/local/google/home/vitalybuka/src/clang.git/arc/arcanist/bin/arc diff --trace
   ARGV  /usr/local/google/home/vitalybuka/src/clang.git/arc/arcanist/scripts/arcanist.php diff --trace
   LOAD  Loaded "arcanist" from "/usr/local/google/home/vitalybuka/src/clang.git/arc/arcanist/src".
  Config: Reading user configuration file "/usr/local/google/home/vitalybuka/.arcrc"...
  Config: Did not find system configuration at "/etc/arcconfig".
  Working Copy: Reading .arcconfig from "/usr/local/google/home/vitalybuka/src/llvm.git/llvm-project/.arcconfig".
  Working Copy: Path "/usr/local/google/home/vitalybuka/src/llvm.git/llvm-project" is part of `git` working copy "/usr/local/google/home/vitalybuka/src/llvm.git/llvm-project".
  Working Copy: Project root is at "/usr/local/google/home/vitalybuka/src/llvm.git/llvm-project".
  Config: Did not find local configuration at "/usr/local/google/home/vitalybuka/src/llvm.git/llvm-project/.git/arc/config".
  >>> [1] (+0) <http> https://reviews.llvm.org/api/user.whoami
  <<< [1] (+489) <http> 489,887 us
  >>> [2] (+490) <conduit> user.whoami() <bytes = 117>
  <<< [2] (+490) <conduit> 89 us
  >>> [3] (+494) <exec> $ git --version
  <<< [3] (+503) <exec> 9,371 us
  >>> [4] (+503) <exec> $ git status --porcelain=2 -z
  <<< [4] (+813) <exec> 309,811 us
  >>> [5] (+814) <event> diff.didCollectChanges <listeners = 0>
  <<< [5] (+814) <event> 85 us
  >>> [6] (+815) <exec> $ git rev-parse --verify HEAD^
  <<< [6] (+826) <exec> 11,203 us
  >>> [7] (+827) <exec> $ git cat-file -t 'HEAD^'
  <<< [7] (+837) <exec> 10,037 us
  >>> [8] (+837) <exec> $ git rev-parse HEAD
  <<< [8] (+848) <exec> 10,249 us
  >>> [9] (+848) <exec> $ git log --first-parent --format=medium 'HEAD^'..bd0884a4955e8ffea1aa0c63e6145c9eedd22286
  <<< [9] (+859) <exec> 11,240 us
  >>> [10] (+863) <http> https://reviews.llvm.org/api/differential.query
  <<< [10] (+1,123) <http> 259,589 us
  >>> [11] (+1,123) <conduit> differential.query() <bytes = 239>
  <<< [11] (+1,123) <conduit> 67 us
  >>> [12] (+1,123) <http> https://reviews.llvm.org/api/differential.query
  <<< [12] (+1,381) <http> 257,272 us
  >>> [13] (+1,381) <conduit> differential.query() <bytes = 149>
  <<< [13] (+1,381) <conduit> 70 us
  >>> [14] (+1,381) <http> https://reviews.llvm.org/api/differential.getcommitmessage
  <<< [14] (+1,655) <http> 274,502 us
  >>> [15] (+1,656) <conduit> differential.getcommitmessage() <bytes = 172>
  <<< [15] (+1,656) <conduit> 66 us
  >>> [16] (+1,656) <http> https://reviews.llvm.org/api/differential.parsecommitmessage
  <<< [16] (+1,914) <http> 258,117 us
  >>> [17] (+1,914) <conduit> differential.parsecommitmessage() <bytes = 441>
  <<< [17] (+1,914) <conduit> 67 us
  >>> [18] (+1,914) <event> diff.didBuildMessage <listeners = 0>
  <<< [18] (+1,914) <event> 60 us
  >>> [19] (+1,915) <exec> $ git rev-parse --git-dir
  <<< [19] (+1,926) <exec> 11,059 us
  Linting...
  >>> [20] (+5,540) <exec> $ git rev-parse HEAD
  <<< [20] (+5,551) <exec> 11,047 us
  >>> [21] (+5,551) <exec> $ git merge-base 'HEAD^' bd0884a4955e8ffea1aa0c63e6145c9eedd22286
  <<< [21] (+5,562) <exec> 10,637 us
  >>> [22] (+5,562) <exec> $ git diff --no-ext-diff --no-textconv --submodule=short --raw 7aadfc1a190cdfe32a9b04fc55cfc25164a903d2 HEAD --
  <<< [22] (+5,575) <exec> 13,128 us
  >>> [23] (+5,576) <exec> $ git -c 'diff.suppressBlankEmpty=false' diff --no-ext-diff --no-textconv --submodule=short --no-color --src-prefix=a/ --dst-prefix=b/ -U32767 -M -C 7aadfc1a190cdfe32a9b04fc55cfc25164a903d2 --
  <<< [23] (+5,661) <exec> 85,034 us
  Examining paths for linter 'clang-format'.
  Found 2 matching paths for linter 'clang-format'.
  >>> [24] (+5,700) <lint> Script and Regex <paths = 2>
  >>> [25] (+5,700) <exec> $ utils/arcanist/clang-format.sh clang/lib/CodeGen/CGExpr.cpp
  >>> [26] (+5,701) <exec> $ utils/arcanist/clang-format.sh clang/test/CodeGen/bounds-checking.cpp
  <<< [26] (+6,544) <exec> 842,917 us
  <<< [24] (+6,718) <lint> 1,018,294 us
  
  [2020-04-03 08:53:16] EXCEPTION: (PhutilAggregateException) Some linters failed:
      - CommandException: Command failed with error #2!
        COMMAND
        utils/arcanist/clang-format.sh clang/test/CodeGen/bounds-checking.cpp
        
        STDOUT
        (empty)
        
        STDERR
        `git read-tree --index-output=.git/clang-format-index --empty` returned 128
        fatal: Unable to create '/usr/local/google/home/vitalybuka/src/llvm.git/llvm-project/.git/index.lock': File exists.
        
        Another git process seems to be running in this repository, e.g.
        an editor opened by 'git commit'. Please make sure all processes
        are terminated then try again. If it still fails, a git process
        may have crashed in this repository earlier:
        remove the file manually to continue.
         at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:264]
  arcanist(head=master, ref.master=368aec16a1ee)
    #0 <#2> ExecFuture::resolvex() called at [<arcanist>/src/lint/linter/ArcanistScriptAndRegexLinter.php:195]
    #1 <#2> ArcanistScriptAndRegexLinter::willLintPaths(array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:575]
    #2 <#2> ArcanistLintEngine::executeLinterOnPaths(ArcanistScriptAndRegexLinter, array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:536]
    #3 <#2> ArcanistLintEngine::executeLintersOnChunk(array, array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:474]
    #4 <#2> ArcanistLintEngine::executeLinters(array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:206]
    #5 ArcanistLintEngine::run() called at [<arcanist>/src/workflow/ArcanistLintWorkflow.php:219]
    #6 ArcanistLintWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1277]
    #7 ArcanistDiffWorkflow::runLint() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1239]
    #8 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:441]
    #9 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:411]


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77363/new/

https://reviews.llvm.org/D77363





More information about the llvm-commits mailing list