openrewrite / rewrite-recipe-markdown-generator

Utility that generates OpenRewrite recipe documentation in markdown format for all recipes on the classpath.
Apache License 2.0
2 stars 7 forks source link

Add test examples to docs again #74

Open mike-solomon opened 1 year ago

mike-solomon commented 1 year ago

See this issue for more information.

timtebeek commented 1 year ago

We can optionally transfer that issue here if you think that makes sense. :)

timtebeek commented 10 months ago

Discussed internally: We've decided to pull extract and generation of examples to this project, no longer distribute the examples with every recipe jar. That should fully decouple (also in time) the extraction from any build logic.

timtebeek commented 10 months ago

As another alternative, which should be low-effort, we can also try to link directly to the tests from the docs & SaaS, where available. That saves on extraction logic.

knutwannheden commented 10 months ago

If we could get the example extraction recipe into a hood shape, I think we could maybe also enable it again, but only have it run on release builds, so that it doesn't slow us down while developing.

knutwannheden commented 10 months ago

Reading through the thread again, it seems like we probably haven't addressed all issues yet, which would require us having that recipe running again.

timtebeek commented 1 month ago

Had another quick look at this; and would like to propose an alternative:

  1. Remove RecipeExamplesTask and ExamplesExtractor recipe from rewrite-build-gradle-plugin
  2. Move ExamplesExtractor recipe into a recipe module, or rewrite-test
  3. Call the Moderne CLI to run ExamplesExtractor against all OpenRewrite recipe module LSTs here
  4. Load recipe examples through YamlResourceLoader here, and mix into recipe descriptors