The problem reporting API has (relatively) recently deprecated org.gradle.api.problems.ProblemSpec#severity in favor of automatic detection via ProblemReporter#report and ProblemReporter#throwing.
My plugin’s task accumulates errors over the run. There may be multiple faulted files, and each file may have multiple critical problems - so it is useful to report as many errors as possible. With the change in the problem reporting API, it now promotes the fail-fast behaviour by throwing an exception for error reports.
It also requires errors to have an exception attached with RuntimeException throwing(Throwable exception, Problem problem);. It doesn’t make sense if the error is not a runtime exception, but for example a syntax error a compiler can’t proceed with.
What is the intended way of error accumulation now?