-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Various users have reported issues with {@CompileStatic}} in Pipelines. See https://github.com/cloudbees/groovy-cps/issues/87 and https://github.com/cloudbees/groovy-cps/issues/88.
Specifically:
- @NonCPS and @CompileStatic cannot be used together (perhaps related to the sandbox transformation?)
- @CompileStatic cannot be used on a class, only on individual methods.
[JENKINS-70018] @CompileStatic does not work well in Pipelines
Summary | Original: @CompileStatic does not work well in Pipeline | New: @CompileStatic does not work well in Pipelines |
Description |
Original:
Various users have reported issues with {@CompileStatic}} in Pipelines. See https://github.com/cloudbees/groovy-cps/issues/87 and https://github.com/cloudbees/groovy-cps/issues/88.
Specifically: * {{@NonCPS}} and {@CompileStatic}} cannot be used together (perhaps related to the sandbox transformation?) * {{@CompileStatic}} cannot be used on a class, only on individual methods. |
New:
Various users have reported issues with {@CompileStatic}} in Pipelines. See https://github.com/cloudbees/groovy-cps/issues/87 and https://github.com/cloudbees/groovy-cps/issues/88.
Specifically: * {{@NonCPS}} and {{@CompileStatic}} cannot be used together (perhaps related to the sandbox transformation?) * {{@CompileStatic}} cannot be used on a class, only on individual methods. |
My practical answer here is to just avoid @CompileStatic and any other complex Groovy features in Pipelines.