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

@CompileStatic does not work well in Pipelines

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin
    • 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

          Devin Nusbaum added a comment -

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

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

          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 Crow added a comment - It is not too late to rewrite Pipeline to be based on BeanShell rather than Groovy! I joke, I joke.

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

              Created:
              Updated: