Copilot commented on code in PR #2835:
URL: https://github.com/apache/groovy/pull/2835#discussion_r3876145110


##########
COMPATIBILITY.md:
##########
@@ -368,6 +368,52 @@ compilation but does not exempt the method from an 
enclosing class's
 `@TypeChecked` checking; only `@TypeChecked(TypeCheckingMode.SKIP)`
 does that.
 
+### Groovy 6 — error tolerance applies to type checking errors (GROOVY-12306)
+
+The compiler's error tolerance — the number of non-fatal errors collected
+before compilation is abandoned, `CompilerConfiguration.getTolerance()`,
+`groovyc -t` — is now enforced for every error kind. It previously covered
+only errors reported through `SourceUnit#addError` (parse and class
+generation); errors reported through `ClassCodeVisitorSupport#addError`,
+which includes all static type checking errors, went straight to
+`ErrorCollector#addErrorAndContinue` and were unbounded.

Review Comment:
   “Every error kind” is broader than the implementation: 
`ErrorCollector.addErrorAndContinue` still deliberately bypasses the threshold, 
and production callers such as `AbstractASTTransformation` and 
`ExtendedVerifier` continue to use that path or bulk-merge collectors without a 
tolerance check. Please scope this compatibility claim to errors reported 
through `ClassCodeVisitorSupport#addError` (including static type-checking 
errors), which is what this change enforces.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to