-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
Currently any Pipeline developer needs to create a new method and to mark it as NonCPS in order to define a NonCPS code. It would be great to create a new NonCPS wrapper method, which allows writing code just within closure.
Example:
nonCPS.exec() { Object fooBar = // non serializable object fooBar.doSomething() }
- relates to
-
JENKINS-50633 JEP-200 - org.apache.maven.model.Model might be dangerous, so rejecting
-
- Resolved
-
- links to
As noted in PR review, this is impossible as described. It would be possible in principle to introduce a new mechanism for delineating a lexical block within a method which is not CPS-transformed, though I do not know offhand what Groovy syntax would be suitable for this purpose, and it would certainly require nontrivial changes to CpsTransformer.