If any change is made to composer.json, 'arc lint' fails with RuntimeException: Undefined array key "hash"
Trace:
EXCEPTION: (PhutilAggregateException) Some linters failed: - RuntimeException: Undefined array key "hash" at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:264] arcanist(head=master, ref.master=df6c315ace5f, custom=4) #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/lint/linter/ArcanistComposerLinter.php:44] #1 <#2> ArcanistComposerLinter::lintComposerJson(string) called at [<arcanist>/src/lint/linter/ArcanistComposerLinter.php:32] #2 <#2> ArcanistComposerLinter::lintPath(string) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:578] #3 <#2> ArcanistLintEngine::executeLinterOnPaths(ArcanistComposerLinter, array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:536] #4 <#2> ArcanistLintEngine::executeLintersOnChunk(array, array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:474] #5 <#2> ArcanistLintEngine::executeLinters(array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:206] #6 ArcanistLintEngine::run() called at [<arcanist>/src/workflow/ArcanistLintWorkflow.php:219] #7 ArcanistLintWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1170] #8 ArcanistDiffWorkflow::runLint() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1132] #9 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:363] #10 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:427]
This is because the hash key was removed from the composer.lock file in composer version 1.3.0 released in 2016. See https://github.com/composer/composer/blob/main/CHANGELOG.md
1.3.0-RC - 2016-12-11
<snip>
- Removed hash from composer.lock, only content-hash is now used which should reduce conflicts