-
Notifications
You must be signed in to change notification settings - Fork 418
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
Several updates to build #924
Several updates to build #924
Conversation
Cake does not currently support platform detection beyond "Windows" and "Unix". We'll soon need to detect "Windows", "Linux" and "macOS". This change does that.
scripts/platform.cake
Outdated
|
||
using System; | ||
|
||
public class Platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's nice that we have robust platform information captured in one place. Maybe for consistency we can replace the calls to the built-in Cake IsRunningOnWindows()
global methods used in several places with platform.IsWindows
. This way we have a guarantee the two logics would not diverge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I'll do that.
it's a shame Cake is on a very old version of Roslyn (1.0.0-rc2). In the newer versions of Roslyn scripting, top level extension methods are supported in scripts which would be perfect for complex build script like this one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit messages are 🍻
Agreed, though it's worse than that. AFAICT, Cake only seems to use Roslyn Scripting on Windows. It seems to use the Mono scripting dialect on OSX/Linux, which has very different semantics. |
@filipw @DustinCampbell we are updating Roslyn and unifying script engines in next release 😉 PR here cake-build/cake#1645 |
8570a2a
to
68c9641
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
68c9641
to
5d2c8d6
Compare
This PR cherry-picks several changes from #915.
--assembly-loader
flag for the Mono runtime, which does a better job of simulating the .NET Framework assembly loading behavior on Mono. In addition, the msbuild that ships with Mono is much more mature, so we can call it directly.I structured each commit to be digestible.