Closed
Conversation
When initializing DeclarativeRecipe instances, work with a copy of the uninitialized list rather than modifying the original. This ensures that when the same recipe instance is initialized in multiple contexts, the modifications don't corrupt the instance state for other uses. The fix: 1. Create a copy of the uninitialized list before iteration 2. Remove duplicates from the copy during deduplication 3. Clear the original uninitialized list at the end to mark initialization complete This preserves recipe instance integrity across multiple initializations.
timtebeek
reviewed
Jan 18, 2026
jkschneider
requested changes
Jan 18, 2026
Member
jkschneider
left a comment
There was a problem hiding this comment.
Could we please wait until at least Monday. I'm not saying it's wrong but would like to carefully consider. Very much worry about this.
Member
|
One of my initial concerns: it feels pretty wrong to apply this uniquely to DeclarativeRecipe. Like using |
Member
Author
|
We will do this instead: #6619 |
sambsnyd
added a commit
that referenced
this pull request
Apr 24, 2026
…leton recipes. (#7468) I had proposed something very similar to this before, here: #6560 That didn't get merged because it felt too magical / special case for DeclarativeRecipe to deduplicate as a silent implementation detail. Instead of doing this the first time we decided on creating Singleton. But with Singleton alone I cannot find a way to guard the scanning phase without breaking ScanningRecipe.generate(). I tried several things. But a common usage for scanning recipes is to verify whether a file already exists, if I skip those then generate() recipes will create files they shouldn't because their scanner was skipped by Singleton. So I'm resurrecting the declarative recipe duplicate loading skip. But this time I'm keying off the presence of Singleton, which explicitly opts-in a recipe to desiring this behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let's stop spending time executing recipes that shouldn't do anything anyway - because a copy of them earlier in the recipe list already did the work