Skip to content

chore: Replace Cake .NET Tool with Cake Frosting #1437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 9, 2025

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented Apr 29, 2025

What does this PR do?

This pull request migrates from Cake .NET Tool to Cake Frosting.

Why is it important?

From the Cake Runners documentation:

Flavor Runner
Cake Scripting Cake .NET Tool
Standard .NET console application Cake Frosting

A console application has the advantage of full IDE support, like IntelliSense, refactoring and debugging, but requires a full .NET project. A scripting approach can be an easier solution for simple build scenarios, as it allows to use a single file.

Since the Cake project was already using multiple files, converting it to Cake Frosting makes sense.

I remember debugging a Cake script some years ago and the experience was not really pleasant. Debugging and refactoring becomes really smooth with full IDE support.

Also, as suggested by the maintainer of the Cake Git add-in, using Cake.Frosting.Git instead of Cake.Git solves the issue of LibGit2Sharp failing on Apple Silicon! 🥳 (That was the original motivation behind this pull request.)

Related issues

/cc @digital88

How to test this PR

The Continuous Integration & Delivery workflow has been updated to use Cake Frosting instead of the Cake .NET Tool (i.e. running ./build.sh instead of dotnet cake) so testing will be done automatically by GitHub actions.

Copy link

netlify bot commented Apr 29, 2025

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 4e702e8
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/681e4edd08d1430008d41ffa
😎 Deploy Preview https://deploy-preview-1437--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@0xced 0xced force-pushed the cake-frosting branch from 7b4f094 to 29fe942 Compare May 2, 2025 10:19
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. There are a two issues:

  1. When the build project is added to the solution, the build fails on Windows. It looks like it's trying to build the project again, which causes the failure (removed it from the solution file for now):
    error MSB3027: Could not copy "C:\Sources\dotnet\testcontainers-dotnet\build\obj\Debug\net9.0\apphost.exe" to "bin\Debug\net9.0\Testcontainers.Build.exe". Exceeded retry count of 10. Failed. The file is locked by: "Testcontainers.Build (24504)"
    error MSB3021: Unable to copy file "C:\Sources\dotnet\testcontainers-dotnet\build\obj\Debug\net9.0\apphost. exe" to "bin\Debug\net9.0\Testcontainers.Build.exe". The process cannot access the file 'C:\Sources\dotnet\testcontainers-dotnet\build\bin\Debug\net9.0\Testcontainers.Build.exe' because it is being used by another process.
    
  2. Also, if you check the build pipeline, it's not running the Windows tests (Windows-hosted runner).

@HofmeisterAn HofmeisterAn added the chore A change that doesn't impact the existing functionality, e.g. internal refactorings or cleanups label May 9, 2025
@HofmeisterAn HofmeisterAn changed the title Migrate from Cake .NET Tool to Cake Frosting chore: Replace Cake .NET Tool with Cake Frosting May 9, 2025
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I updated the GitHub step to use bash and install the SonarScanner again.

@HofmeisterAn HofmeisterAn merged commit 33950f1 into testcontainers:develop May 9, 2025
70 checks passed
@0xced 0xced deleted the cake-frosting branch May 15, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore A change that doesn't impact the existing functionality, e.g. internal refactorings or cleanups
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cake .NET tool (the Cake.Git package) doesn't support macOS (ARM64) OOB
2 participants