Skip to content

Conversation

@knutwannheden
Copy link
Contributor

@knutwannheden knutwannheden commented Apr 3, 2025

No description provided.

* Precondition recipes must not produce data table rows

When a recipe is used as a precondition of another recipe, it must not produce any data table rows. Only the recipes which are executed by the recipe scheduler must produce data table rows.

* Declare `DataTable#recipe` as transient

* Small fixes

* Polish

* Remove some hacks

* Another indirection for built-in data tables

* Support RPC

* Polish

(cherry picked from commit 48784bb)
When a recipe is used as a precondition of another recipe, it must not produce any data table rows. Only the recipes which are executed by the recipe scheduler must produce data table rows.

The original take on this (#5228) didn't work properly, because of how declarative recipes with preconditions have been implemented as classes implementing the `DelegatingRecipe` interface, where the recipe being executed by the recipe scheduler is a wrapper for the actual recipe.
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions could not be made:

  • rewrite-core/src/main/java/org/openrewrite/internal/RecipeIntrospectionUtils.java
    • lines 191-200

@knutwannheden knutwannheden marked this pull request as draft April 3, 2025 07:28
@timtebeek timtebeek added bug Something isn't working enhancement New feature or request labels Apr 9, 2025
@github-actions
Copy link
Contributor

This PR is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jul 14, 2025
@github-actions github-actions bot closed this Jul 21, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Jul 21, 2025
@timtebeek timtebeek deleted the no-precondition-data-tables branch October 28, 2025 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request Stale

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants