When attempting to execute a pipeline that loads a library written in Groovy I receive the following exception:

      Unsupported expression for CPS transformation @ line -1, column -1
      

      The Groovy class that is referenced is a simple POGO with the class-level annotation

       @EqualsAndHashCode 

      . Removing the annotation resolves the exception for that class.

      This is a major problem with the plugin and it almost makes it unusable. For any non-trivial library it will most likely make use of Groovy language features such as class annotations. To remove the annotations would require extensive refactoring throughout the library and introduce a lot of boiler plate.

      Lack of support for Groovy class annotations is not explicitly documented (as far as I can see) either in this plugin or in the [workflow-cps-plugin](https://github.com/jenkinsci/workflow-cps-plugin).

      A workaround or solution would be very much appreciated!

          [JENKINS-40564] Groovy class annotations not supported

          Jesse Glick added a comment -

          Not sure offhand what the issue here is (other annotations do work). Maybe only applies to source-generating annotations. Anyway

          For any non-trivial library it will most likely make use of Groovy language features

          Sorry but esoteric Groovy language features are not generally available in Pipeline script. Keep to the basics, and implement equals and hashCode directly.

          Jesse Glick added a comment - Not sure offhand what the issue here is (other annotations do work). Maybe only applies to source-generating annotations. Anyway For any non-trivial library it will most likely make use of Groovy language features Sorry but esoteric Groovy language features are not generally available in Pipeline script. Keep to the basics, and implement equals and hashCode directly.

          Marcus added a comment -

          Any chance to get that fixed 5 years later?

          Marcus added a comment - Any chance to get that fixed 5 years later?

            Unassigned Unassigned
            boon Joe Harte
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: