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

Fix usage of Cake.Recipe on Travis #60

Closed
gep13 opened this issue Mar 9, 2017 · 2 comments · Fixed by #530
Closed

Fix usage of Cake.Recipe on Travis #60

gep13 opened this issue Mar 9, 2017 · 2 comments · Fixed by #530
Labels
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Mar 9, 2017

When running Cake.Recipe on Travis, the following error occurs:

https://travis-ci.org/cake-contrib/Cake.Plist/jobs/209156414#L1435

Compiling build script...
Error: Cake.Core.CakeException: An error occurred while executing build script.
  at Cake.Scripting.Mono.MonoScriptSession.Execute (Cake.Core.Scripting.Script script) [0x0007f] in <077b4364678d402f9df8bb48e9f0a543>:0 
  at Cake.Core.Scripting.ScriptRunner.Run (Cake.Core.Scripting.IScriptHost host, Cake.Core.IO.FilePath scriptPath, System.Collections.Generic.IDictionary`2[TKey,TValue] arguments) [0x00314] in <78602f51bc554886aeaf7e173d0ce2e7>:0 
  at Cake.Commands.BuildCommand.Execute (Cake.CakeOptions options) [0x0002d] in <077b4364678d402f9df8bb48e9f0a543>:0 
  at Cake.CakeApplication.Run (Cake.CakeOptions options) [0x0001d] in <077b4364678d402f9df8bb48e9f0a543>:0 
  at Cake.Program.Main () [0x000dc] in <077b4364678d402f9df8bb48e9f0a543>:0

I have been able to reproduce this error by compiling and running Cake on an Ubuntu VM, using JetBrains Rider. The issue comes down to the Cake.AppVeyor addin.

Now, some of you might be thinking, why are you using the Cake.AppVeyor addin when you are running on Travis, and this is due to the fact that you can't conditionally reference an addin, so it has to be included.

While debugging, it is the following method in the Cake.AppVeyor addin that is causing the problem:

image

Which reports the following error message:

System.Nullable [System.Int32] is not a supported constant type

The suspicion is that something in the Mono Compiler for Cake is either confused, or does not support what this method is trying to do.

@devlead
Copy link
Member

devlead commented Mar 9, 2017

This is the generated code causing the issue

public Cake.AppVeyor.AppVeyorProjectHistory AppVeyorProjectHistory(Cake.AppVeyor.AppVeyorSettings settings, System.String accountName, System.String projectSlug, System.Int32 recordsPerPage, System.Nullable<System.Int32> startBuildId = null, System.String branch = null)
{
    return Cake.AppVeyor.AppVeyorAliases.AppVeyorProjectHistory(Context, settings, accountName, projectSlug, recordsPerPage, startBuildId, branch);
}

@devlead
Copy link
Member

devlead commented Mar 9, 2017

This is the method being invoked:
http://cakebuild.net/api/Cake.AppVeyor/AppVeyorAliases/2C3663E7

public static AppVeyorProjectHistory AppVeyorProjectHistory(this ICakeContext context, AppVeyorSettings settings, string accountName, string projectSlug, int recordsPerPage, int? startBuildId = null, string branch = null)

gep13 added a commit that referenced this issue Apr 12, 2017
- this will prevent the build error that we are seeing on Travis
- There will likely be other build failures though
@gep13 gep13 added this to the 2.0.0 milestone Sep 9, 2019
AdmiringWorm referenced this issue in AdmiringWorm/Cake.Recipe Jul 7, 2020
First basic implementation of a build provider
for Travis CI

fixes #60
@gep13 gep13 closed this as completed in #530 Jul 7, 2020
gep13 added a commit that referenced this issue Jul 7, 2020
(GH-60) Implemented build provider for Travis CI
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.

3 participants