algorithm-archivists / algorithm-archive

A collaborative book on algorithms
https://www.algorithm-archive.org
MIT License
2.33k stars 353 forks source link

Adding C# to the build system (using the Mono toolchain) #1012

Closed Amaras closed 10 months ago

Amaras commented 10 months ago

This is a PR to add C# to our build system, making sure we have a common ground. I see we have the dotnet sdk, but I could not find the command to compile using it, don't hesitate to close this PR if you give me the proper way.

Because I used Mono, there were a few changes in two files, as Mono doesn't allow functions inside functions, apparently.

This follows from #1011, but might need to be merged before.

Amaras commented 10 months ago

Right... @ntindle or @ShadowMitia, do I need to separate the Docker stuff from the SCons stuff for the build to pass?

ntindle commented 10 months ago

Docker should probably go in first. I can't remember the exact repo ci we used but if we did it right, it won't use the dockerfile you provide here but the one on the base branch

ShadowMitia commented 10 months ago

FYI: for dotnet you can use this as reference: https://github.com/SebLague/Chess-Challenge/discussions/3 But it could be good to support both? I don't really know C# ecosystem well enough. I don't have an opinion on which one is better to use.

Amaras commented 10 months ago

There we go, everything builds :) If someone wants to review it, please do so we can move on