New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When describing classes in a Pipeline Shared Library that have "data" they must be serializable #495
When describing classes in a Pipeline Shared Library that have "data" they must be serializable #495
Conversation
@@ -229,7 +229,7 @@ constructor, or just one method: | |||
[source,groovy] | |||
---- | |||
package org.foo | |||
class Utilities { | |||
class Utilities implements Serializable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need updating as well? https://github.com/jenkins-infra/jenkins.io/pull/495/files#diff-d0909a306d46ea261898f36947fb9d9bL260
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, maybe not. The other is static so it doesn't need to be serializable.
On the other hand, the distinction seems like something that would be easy to mess up or forget if one goes from only having a static method to having some data. It is worth highlighting with a warning block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try to add some verbiage around it, but I'm loathe to litter these documents with so many admonitions for every possible way to fuck up Groovy 🙁 :
… they must be Serializable Fixes JENKINS-38868
8c360dc
to
7d67519
Compare
🐝 Looks good to me. |
Build failing right now because of
Cute |
Argh, we are writing more content that duplicates content defined somewhere else without deleting the original? Overlaps jenkinsci/workflow-cps-global-lib-plugin#23. This is unmanageable. We need to have a policy for keeping a single version of the truth. |
@jglick If you would like me to submit pull requests to various repositories when content is reworked for jenkins.io, I can do that. The documents aren't identical however, I removed and rewrote some content to try to make it more clear to readers as they progress through the chapter. |
Fixes JENKINS-38868