Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70018

@CompileStatic does not work well in Pipelines

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          dnusbaum Devin Nusbaum added a comment -

          My practical answer here is to just avoid @CompileStatic and any other complex Groovy features in Pipelines.

          dnusbaum Devin Nusbaum added a comment - My practical answer here is to just avoid @CompileStatic and any other complex Groovy features in Pipelines.
          basil Basil Crow added a comment -

          It is not too late to rewrite Pipeline to be based on BeanShell rather than Groovy! I joke, I joke.

          basil Basil Crow added a comment - It is not too late to rewrite Pipeline to be based on BeanShell rather than Groovy! I joke, I joke.

          People

            Unassigned Unassigned
            dnusbaum Devin Nusbaum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: