You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the task runner encounters an error (e.g. scalafmt detects formatting issues), it falls over with a JavaScript error, and doesn't print the helpful error message telling the developer what to do next.
Steps to Reproduce
Add a bunch of random tabs and line breaks to a Scala file (e.g. FeatureSwitches.scala)
Kick off the scalafmt task in task-runner in the terminal by running $ ./tools/task-runner/runner.mjs validate-head/scala.mjs
Actual Results (include screenshots)
There's a whole lot of noise and you have to hunt for the useful information and deduce what action to take. I believe the task-runner falls over, on line 109 of task-runner.mjs, because context is not available on the Error received by the catch().
This might have been introduced in the recent migration to ESM (#27262), although this is only a hunch.
ISSUE
When the task runner encounters an error (e.g.
scalafmt
detects formatting issues), it falls over with a JavaScript error, and doesn't print the helpful error message telling the developer what to do next.Steps to Reproduce
scalafmt
task in task-runner in the terminal by running$ ./tools/task-runner/runner.mjs validate-head/scala.mjs
Actual Results (include screenshots)
There's a whole lot of noise and you have to hunt for the useful information and deduce what action to take. I believe the task-runner falls over, on line 109 of task-runner.mjs, because
context
is not available on the Error received by thecatch()
.This might have been introduced in the recent migration to ESM (#27262), although this is only a hunch.
On a broader point, I'm not sure if we need this much custom error handling, as I'd expect Listr to take care of it.
Expected Results (include screenshots)
I would expect to see a helpful error message, such as the one defined in
scala.mjs
:The text was updated successfully, but these errors were encountered: