Can't create a diff in the module-starter repo

Launching editor "nano"...
Provide the details for a new revision, then save and exit.
Linting...
No paths are lintable.
Running unit tests...
Exception
strlen(): Passing null to parameter #1 ($string) of type string is deprecated
(Run with `--trace` for a full exception trace.)\

with --trace:

Running unit tests...
>>> [25] (+3,969) <exec> $ npm run test-reports
<<< [25] (+15,103) <exec> 11,134,089 us

[2024-07-22 19:31:44] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arc-unit-mocha(), arcanist(), pinterest-linters(head=master, ref.master=ca6d7679625f)
#0 PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/unit/renderer/ArcanistUnitConsoleRenderer.php:15]
#1 ArcanistUnitConsoleRenderer::renderUnitResult(ArcanistUnitTestResult) called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:189]
#2 ArcanistUnitWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1231]
#3 ArcanistDiffWorkflow::runUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1133]
#4 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:363]
#5 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:427]
<<< [1] (+15,395) <exec> 15,395,822 us

Does anyone know how to fix this?

Hmm. What’s the output of npm run test?

$ npm run test

> module-starter@0.0.1 test
> mocha



Example
example
✔ should equal 'example'


1 passing (5ms)

Ah, I see now that this is related to PHP. What’s the output of php --version? Did you install all dependencies exactly as prescribed in the link below?

https://hub.sealcode.org/w/sealhub_workflow/narzedzia/arcanist/

I switched from the arc-unit-mocha-sealcode-git aur package to the packages provided in your arc setup guide and I think it works now.

1 Like