Ensure we have all references for output preconditions#32464
Conversation
Output references must also include the error_message expression. Fix the early return in referencesForOutput, which could skip preconditions. The small slice allocation optimization is not really needed here, since this is not a hot path at all.
These references were getting dropped, which could cause the referenced nodes to be pruned from the graph.
apparentlymart
left a comment
There was a problem hiding this comment.
Hmm I can see how this happened... the initial preconditions/postconditions prototype required error messages to be just static strings so we were evaluating them in the config decoder rather than at runtime. We later moved the error message evaluation into the same spot as the condition evaluation, but apparently neglected to tell the References function about that.
This seems like a fine fix for that oversight! 👍
|
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Output references from
error_messagewere not being tracked. Also fix the early return inreferencesForOutput, which could skip preconditions altogether. The small slice allocation optimization is not really needed here, since this is not a hot path at all.Fixes #32447