cake icon indicating copy to clipboard operation
cake copied to clipboard

GH4517: - Cake Frosting WithCriteria Description

Open tstewart65 opened this issue 7 months ago • 2 comments

Marked the current ShouldRun method obsolete. Added a new property to IFrostingTask, ShouldRunCriteria which is a List of CakeTaskCriteria. This allows you to have multiple criteria just like what could be done in Cake.Tool.

The current method of the ShouldRun method that you could override and the SkippedMessage has shortcoming when compared to Cake.Tool. First the SkippedMessage could not be set the way it is currently implemented and it only allowed for one message for the task being skipped. It could not be changed if you had multiple criteria to check for skipping a task.

The new ShouldRunCriteria property allows you to setup multiple criteria and have a different message for each one just like Cake.Tool.

This would be nice to have in 5.1 to allow me to continue converting a current cake recipe here at work over to Cake.Frosting. The one downfall is since Cake.Frosting does not support the Spectre Console output the skipped messages are not shown in the summary at this time.

tstewart65 avatar Jun 17 '25 22:06 tstewart65

As discussed offline via email, we will not be able to proceed with this PR (as it is currently written), until the next major release of Cake, since it contains breaking changes.

gep13 avatar Dec 06 '25 17:12 gep13

I am adding the Breaking Change label here (normally this would be applied to the issue, but putting it on the PR for now, as a reminder about what is going on here.

gep13 avatar Dec 06 '25 17:12 gep13