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

New Setup(Action<ICakeContext>) fails on mono #883

Closed
devlead opened this issue May 13, 2016 · 2 comments · Fixed by #892
Closed

New Setup(Action<ICakeContext>) fails on mono #883

devlead opened this issue May 13, 2016 · 2 comments · Fixed by #892
Assignees
Labels
Milestone

Comments

@devlead
Copy link
Member

devlead commented May 13, 2016

What You Are Seeing?

New Setup(Action) gives an DelegateSystem.Action' does not take 1' arguments error on mono

What is Expected?

For it to not give an error

What version of Cake are you using?

0.11.0

Are you running on a 32 or 64 bit system?

64 bit

What environment are you running on? Windows? Linux? Mac?

Fails on both Windows & Linux

Are you running on a CI Server? If so, which one?

Travis
https://travis-ci.org/cake-build/cake/jobs/129951741

Output Log

build.cake (21,7): Delegate `System.Action' does not take `1' arguments
Error: An error occured while executing build script.
@patriksvensson
Copy link
Member

Funny, but don't get this when defining a Setup(Action). Although, it looks like it warns about obsoleted method although they aren't used in the build script!

PS> .\build.ps1
Bootstrapping Cake...
Running build script 'build.cake'...
Analyzing build script...
Processing build script...
Installing tools...
Installing addins...
Compiling build script...
unknown.cake (1595,43): `Cake.Common.Xml.XmlPokeAliases.XmlPoke(this Cake.Core.ICakeContext, string, string, string)' is obsolete: `Please use XmlPokeString(string, string, string) instead.'
unknown.cake (1602,43): `Cake.Common.Xml.XmlPokeAliases.XmlPoke(this Cake.Core.ICakeContext, string, string, string, Cake.Common.Xml.XmlPokeSettings)' is obsolete: `Please use XmlPokeString(string, string, string, XmlPokeSettings) instead.'
unknown.cake (1773,45): `Cake.Core.Scripting.IScriptHost.Setup(System.Action)' is obsolete: `Please use Setup(Action<ICakeContext>) instead.'
unknown.cake (1774,47): `Cake.Core.Scripting.IScriptHost.Teardown(System.Action)' is obsolete: `Please use Teardown(Action<ICakeContext>) instead.'

@devlead devlead added the Bug label May 13, 2016
devlead added a commit to devlead/cake that referenced this issue May 17, 2016
* Added CakeBuildScriptImplBase base class that inherits from IScriptHost
* Removed GetScriptHostProxy() from CakeBuildScriptImpl
* Added so CakeBuildScriptImpl inherits from CakeBuildScriptImplBase
This fixes cake-build#883 and should ensure we avoid missing members in the future.
devlead added a commit to devlead/cake that referenced this issue May 17, 2016
* Added CakeBuildScriptImplBase base class that inherits from IScriptHost
* Removed GetScriptHostProxy() from CakeBuildScriptImpl
* Added so CakeBuildScriptImpl inherits from CakeBuildScriptImplBase

This fixes cake-build#883 and should ensure we avoid missing members in the future.
@devlead devlead self-assigned this May 17, 2016
@devlead devlead added this to the v0.12.0 milestone May 17, 2016
@devlead
Copy link
Member Author

devlead commented May 17, 2016

@cake-build/team found the issue will submit an PR shortly.

devlead added a commit to devlead/cake that referenced this issue May 17, 2016
* Added CakeBuildScriptImplBase base class that inherits from IScriptHost
* Removed GetScriptHostProxy() from CakeBuildScriptImpl
* Added so CakeBuildScriptImpl inherits from CakeBuildScriptImplBase

This fixes cake-build#883 and should ensure we avoid missing members in the future.
devlead added a commit to devlead/cake that referenced this issue May 17, 2016
* Added CakeBuildScriptImplBase base class that inherits from IScriptHost
* Removed GetScriptHostProxy() from CakeBuildScriptImpl
* Added so CakeBuildScriptImpl inherits from CakeBuildScriptImplBase

This fixes cake-build#883 and should ensure we avoid missing members in the future and reduces chance of errors thru "dynamic" code not compiled with Cake.
devlead added a commit to devlead/cake that referenced this issue May 17, 2016
* Added CakeBuildScriptImplBase base class that inherits from IScriptHost
* Removed GetScriptHostProxy() from CakeBuildScriptImpl
* Added so CakeBuildScriptImpl inherits from CakeBuildScriptImplBase

This fixes cake-build#883 and should ensure we avoid missing members in the future and reduces chance of errors thru "dynamic" code not compiled with Cake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants