Currently, there seem to be numerous features of Groovy that simply do not work when used in Jenkinsfiles or associated scripts.

      Even really basic things such as groovy-style iterators are not suppported: something I wasted a lot of time on until I finally came across https://issues.jenkins-ci.org/browse/JENKINS-26481

      I wrote a nifty thing that uses inheritance, got "General error during canonicalisation: Unexpected variable type: null", and then finally found https://issues.jenkins-ci.org/browse/JENKINS-34428 - apparently calls to super don't work, either.

      Writing nontrivial Jenkinsfiles currently involves a cycle in which you write your code, it produces a confusing crash in the CPS engine, you go hunting, eventually find a bug report, remove the offending language feature, and repeat.

      This is not fun.

      Can we please have documentation stating which subset of the Groovy language actually works?

      Even better: where it is possible to do so simply (such as for inheritance) can we please have a nice readable error message instead of an incomprehensible one?

          [JENKINS-38915] Document limitations of language coverage

          Oleg Nenashev added a comment -

          Fixed the component and the assignee

          Oleg Nenashev added a comment - Fixed the component and the assignee

          Jesse Glick added a comment -

          Probably a duplicate.

          Jesse Glick added a comment - Probably a duplicate.

          Chris Kitching added a comment - - edited

          Here's another time-waster that I stumbled into the hard way:
          https://issues.jenkins-ci.org/browse/JENKINS-26313

          Limitations are fine. Undocumented limitations are a huge time-suck. Please aggregate a list of such issues somewhere so people have a realistic chance of being able to write working Jenkinsfile scripts without having to hunt around on the bug tracker.

          Chris Kitching added a comment - - edited Here's another time-waster that I stumbled into the hard way: https://issues.jenkins-ci.org/browse/JENKINS-26313 Limitations are fine. Undocumented limitations are a huge time-suck. Please aggregate a list of such issues somewhere so people have a realistic chance of being able to write working Jenkinsfile scripts without having to hunt around on the bug tracker.

          Jesse Glick added a comment -

          Writing up complete documentation is work like anything else, and everyone qualified to do it is overloaded. You can leave a vote on this issue like any other. Complaining about software you are using for free does not move anything forward.

          Jesse Glick added a comment - Writing up complete documentation is work like anything else, and everyone qualified to do it is overloaded. You can leave a vote on this issue like any other. Complaining about software you are using for free does not move anything forward.

          Lucas Cimon added a comment -

          Here is another : support for tuples : https://issues.jenkins-ci.org/browse/JENKINS-38846

          Lucas Cimon added a comment - Here is another : support for tuples : https://issues.jenkins-ci.org/browse/JENKINS-38846

          Devin Nusbaum added a comment -

          Even better: where it is possible to do so simply (such as for inheritance) can we please have a nice readable error message instead of an incomprehensible one?

          I'm not sure about inheritance specifically, but JENKINS-31314 should improve error messages for some of these cases, and the error messages will link to https://wiki.jenkins.io/display/JENKINS/Pipeline+CPS+method+mismatches which has relevant documentation for common issues.

          Devin Nusbaum added a comment - Even better: where it is possible to do so simply (such as for inheritance) can we please have a nice readable error message instead of an incomprehensible one? I'm not sure about inheritance specifically, but JENKINS-31314 should improve error messages for some of these cases, and the error messages will link to https://wiki.jenkins.io/display/JENKINS/Pipeline+CPS+method+mismatches which has relevant documentation for common issues.

            Unassigned Unassigned
            ckitching Chris Kitching
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: