Requirement that Recipes be serializable #4348
-
One of our recipes requires using an HTTP client. This is (currently) maintained as an instance variable. It is not serializable and our test made us aware of this via its serialization verification. We made the client I can just instantiate the client as part of a visitor, but I'd still like to know the reason for the serialization requirement. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! OpenRewrite recipes can run in a growing number of environments, some of which leverage serialization of recipes. While indeed the OSS Maven or Gradle plugins do not use serialization beyond loading yaml recipes, others like the Moderne Platform and CLI do. To prevent any accidental incompatibilities we've made that check part of our testing framework, to surface issues early. I hope that helps answer your question! |
Beta Was this translation helpful? Give feedback.
Hi! OpenRewrite recipes can run in a growing number of environments, some of which leverage serialization of recipes. While indeed the OSS Maven or Gradle plugins do not use serialization beyond loading yaml recipes, others like the Moderne Platform and CLI do. To prevent any accidental incompatibilities we've made that check part of our testing framework, to surface issues early. I hope that helps answer your question!