jenkinsci / jenkinsci/workflow-cps-plugin
[JENKINS-70018] @CompileStatic does not work well in Pipelines
- Dominant language
- Java
- Stars
- 186
- Forks
- 213
- Avg merge
- 12h 12m
- Merged PRs (30d)
- 8
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.
---
Originally reported by
dnusbaum, imported from: @CompileStatic does not work well in Pipelines
Raw content of original issue
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.
Contributor guide
Research direction
Start by reading the linked groovy-cps issues 87 and 88, then inspect the workflow-cps-plugin behavior around @NonCPS and @CompileStatic. Reproduce both reported cases; done means the annotations work together and @CompileStatic works on classes as well as individual methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100