question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrading to spectre.console 0.47.0 breaks the cake build

See original GitHub issue

Prerequisites

  • 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

  1. Create a branch from the most recent cake develop branch
  2. Open the solution and upgrade both spectre.console NuGet packages to 0.47.0
  3. Build and run tests locally (should all pass)
  4. Check-in and push, create PR
  5. 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

image


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:open
  • Created 4 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
FrankRay78commented, Jul 11, 2023

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · cake-build/cake
cake: Cake (C# Make) is a cross platform build automation system. - Issues · cake-build/cake. ... Upgrading to spectre.console 0.47.0 breaks the cake...
Read more >
Upgrading to spectre.console 0.47.0 breaks the cake build - bytemeta
Create a branch from the most recent cake develop branch · Open the solution and upgrade both spectre.console NuGet packages to 0.47.0 ·...
Read more >
Console Output
Cake ships with Spectre.Console, which provides advanced functionality to output content to the console, like progress bars, spinners, tables, trees, ...
Read more >
Spectre.Console 0.47 released!
Version 0.47 of Spectre.Console has been released! There are a lot of fixes and improvements in this release, the most noteworthy changes ...
Read more >
Spectre.Console 0.47.1-preview.0.9
Version Downloads Last updated 0.47.1‑preview.0.11 4,480 a month ago 0.47.1‑preview.0.10 354 a month ago 0.47.1‑preview.0.9 45 a month ago
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found