Upgrading to spectre.console 0.47.0 breaks the cake build
See original GitHub issuePrerequisites
- I have written a descriptive issue title
- I have searched issues to ensure it has not already been reported
Cake runner
Cake .NET Tool
Cake version
Most recent develop branch (b55239f748f921edc303d644839183e9727e00a4)
Operating system
Linux, Windows, macOS
Operating system architecture
64-Bit
CI Server
GitHub action on the main cake-build/cake repo
What are you seeing?
Something in spectre.console 0.47.0 breaks the Cake build, I’ve verified it conclusively on the following PR: https://github.com/cake-build/cake/pull/4156
I took the latest upstream develop branch and pushed it - the build passes. I then upgrade the spectre.console NuGet packages to 0.47.0 and re-push - the build fails with timing issues
The failure is originating in tests\integration\Cake\ScriptCache.cake
, namely:
139 Assert.True(data.CompileResult.Elapsed > data.ExecuteResult.Elapsed, $"Compile time {data.CompileResult.Elapsed} should be greater than execute time {data.ExecuteResult.Elapsed}.");
140 Assert.Equal(data.CompileResult.Hash, data.ExecuteResult.Hash);
And also
152 Assert.True(data.ReCompileResult.Elapsed> data.ExecuteResult.Elapsed, $"ReCompileTime time {data.ReCompileResult.Elapsed} should be greater than execute time {data.ExecuteResult.Elapsed}.");
153 Assert.NotEqual(data.CompileResult.Hash , data.ReCompileResult.Hash);
Even when I commented out the first Assert statement, the NotEqual Hash assert still fails (see commit: https://github.com/cake-build/cake/pull/4156/commits/bbb2324259f17b18d0a89d44db8f51f6594fe5a0)
What is expected?
The build to pass
Steps to Reproduce
- Create a branch from the most recent cake
develop
branch - Open the solution and upgrade both spectre.console NuGet packages to 0.47.0
- Build and run tests locally (should all pass)
- Check-in and push, create PR
- Build then fails
Output log
https://github.com/cake-build/cake/actions/runs/5055159519 https://github.com/cake-build/cake/actions/runs/5055159519/jobs/9070991328#step:5:1035
cc: @patriksvensson (nb. I’ve spent a bit of time pushing different changes to the test PR, https://github.com/cake-build/cake/pull/4156, and still don’t understand what’s causing this.)
Next steps
One possibility is to locally build a NuGet package, for each spectre.console commit since 0.46.0, pushing them one by one to the test PR https://github.com/cake-build/cake/pull/4156, in order to try and identify exactly what change might be causing the cake build failure.
Issue Analytics
- State:
- Created 4 months ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Thank you so much for this @devlead, a thoroughly useful investigation that was beyond my means. I’ll pick this up from here and see if I can get it fixed in spectre.console
Suspect it’s this change in behavior https://github.com/spectreconsole/spectre.console/commit/714cf179cb349597a8b775287ac8299584b18617?diff=unified#diff-4a7ee1042c6d7b131733b2395f43b1a7e80562c80151c5aa49bcedc9095a0bc8L361-R380
That’s breaking Cake.