Skip to content
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

Switch from MSBuild to Cake #137

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JamJar00
Copy link
Member

@JamJar00 JamJar00 commented Aug 7, 2022

Wanted to create this and leave it here to spark some conversation.

Problem

  • MSBuild is incredibly hard to understand
  • MSBuild Commuinty Tasks, which DR uses extensively, is dead and buried
  • Using MSBuild Community Tasks, forces anyone building DR to use .NET Framework which means people on OSX/Linux cannot build DR
    • This makes it a pain to CI as we have to conditionally disable bits of the build process that use it to make it build
  • There's a lot of different parts to building DR: MSBuild, bash/python release script & Unity editor script

Cake

Cake is a build tool written in C#. It's very easy to read and write for people who know C#, very easy to install (dotnet tool restore and you're done) and is completely cross platform (no .NET Framework).

I was able to dev this MR in WSL with only .NET 6 installed and able to build to even the .NET Framework versions (to my surprise) so I'm pretty happy this will open DR dev up to more people!

It does require that users have a basic understanding of using the terminal if they want to do a full build of DR. Currently when a user builds in VS MSBuild will create the ./Build folder but with Cake they'd only get the individual project builds until they run dotnet cake.

This MR replaces all the MSBuild tasks with Cake. Having played with it for an afternoon I'm really happy with how easy it is to use and how much it improves the build process over MSBuild Community Tasks. Personally, I'm keen to adopt this.

Further down the line I can see some opportunity to expand what we do with Cake to make it really easy to dev for DR. For example, creating Unity packages, doing releases (I tried this and there's a lot going on!) and doing the copy from ./Build into DarkRift.Unity so that everything's neatly managed by a single tool and one set of commands.

I'm expecting a lot of discussion 😛

Release task is partially implemented but will require more work to get
in a good state
@4real
Copy link
Contributor

4real commented Oct 12, 2022

Not a fan of Msbuild myself and understand the problem, but I will need to sit down and look into Cake, whenever there's time for that. So this PR will be left hanging for some time more.

@frarees
Copy link

frarees commented Dec 22, 2022

Note that Unity plans on having MSBuild support in the near future (source, details).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants