cake-build / bakery Goto Github PK
View Code? Open in Web Editor NEWCake server for code generation and script analysis
Home Page: https://cakebuild.net/
License: MIT License
Cake server for code generation and script analysis
Home Page: https://cakebuild.net/
License: MIT License
It takes lots of time to shell out to nuget and try to install packages which doesn't exist.
Example, writing #addin Cake.Figlet
in VSCode one char at a time will result in trying to install packages C
, Ca
, Cak
etc...
related to #42 which fixed code gen. Documentation is still however missing.
Reproduce with this alias.
public System.Int32 StartProcess(Cake.Core.IO.FilePath fileName, Cake.Core.IO.ProcessSettings settings, out System.Collections.Generic.IEnumerable<System.String> redirectedOutput)
{
return Cake.Common.ProcessAliases.StartProcess(Context, fileName, settings, out redirectedOutput);
}
ping @patriksvensson
Using VsCode 1.17 with C# 1.13.0-beta4
I added the line
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease
in a .cake
file.
Running it the first time worked.
After that, I continued to edit the file.
When I hit Ctrl+Space to get intellisense I noticed another directory of Cake.Recipe
was downloaded.
The complete cake script:
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease
Environment.SetVariableNames();
BuildParameters.SetParameters(context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./src",
title: "Cake.Openshift",
repositoryOwner: "cake-contrib",
repositoryName: "Cake.Openshift",
appVeyorAccountName: "cakecontrib");
BuildParameters.PrintParameters(Context);
ToolSettings.SetToolSettings(context: Context);
Build.RunDotNetCore();
It downloaded another copy of Cake.Recipe
only when my cursor was in the method BuildParameters.SetParameters
to get more details about more arguments for the method
We should sign the artifacts.
@gep13 could you takevthe lead on this one?
Bakery.exe
as toolCake.Scripting.Transport
as libraryNamespace missing from Usings list.
Tested with this simple script:
#addin "Cake.Incubator"
var target = Argument("target", "Default");
Task("Default")
.Does(() =>
{
Information(new NUnit3Settings().Dump());
});
RunTarget(target);
But generates the below (actual). Reference generated by Cake.exe
(expected).
Expected | Actual |
---|---|
Cake.Common | |
Cake.Common.Build | |
Cake.Common.Build.AppVeyor | Cake.Common.Build.AppVeyor |
Cake.Common.Build.AppVeyor.Data | Cake.Common.Build.AppVeyor.Data |
Cake.Common.Build.Bamboo | Cake.Common.Build.Bamboo |
Cake.Common.Build.Bamboo.Data | Cake.Common.Build.Bamboo.Data |
Cake.Common.Build.BitbucketPipelines | Cake.Common.Build.BitbucketPipelines |
Cake.Common.Build.BitbucketPipelines.Data | Cake.Common.Build.BitbucketPipelines.Data |
Cake.Common.Build.Bitrise | Cake.Common.Build.Bitrise |
Cake.Common.Build.Bitrise.Data | Cake.Common.Build.Bitrise.Data |
Cake.Common.Build.ContinuaCI | Cake.Common.Build.ContinuaCI |
Cake.Common.Build.ContinuaCI.Data | Cake.Common.Build.ContinuaCI.Data |
Cake.Common.Build.GitLabCI | Cake.Common.Build.GitLabCI |
Cake.Common.Build.GitLabCI.Data | Cake.Common.Build.GitLabCI.Data |
Cake.Common.Build.GoCD | Cake.Common.Build.GoCD |
Cake.Common.Build.GoCD.Data | Cake.Common.Build.GoCD.Data |
Cake.Common.Build.Jenkins | Cake.Common.Build.Jenkins |
Cake.Common.Build.Jenkins.Data | Cake.Common.Build.Jenkins.Data |
Cake.Common.Build.MyGet | Cake.Common.Build.MyGet |
Cake.Common.Build.TeamCity | Cake.Common.Build.TeamCity |
Cake.Common.Build.TFBuild | Cake.Common.Build.TFBuild |
Cake.Common.Build.TFBuild.Data | Cake.Common.Build.TFBuild.Data |
Cake.Common.Build.TravisCI | Cake.Common.Build.TravisCI |
Cake.Common.Build.TravisCI.Data | Cake.Common.Build.TravisCI.Data |
Cake.Common.Diagnostics | |
Cake.Common.IO | |
Cake.Common.IO.Paths | Cake.Common.IO.Paths |
Cake.Common.Net | |
Cake.Common.Security | |
Cake.Common.Solution | |
Cake.Common.Solution.Project | |
Cake.Common.Solution.Project.Properties | |
Cake.Common.Solution.Project.XmlDoc | |
Cake.Common.Text | |
Cake.Common.Tools | |
Cake.Common.Tools.Cake | |
Cake.Common.Tools.Chocolatey | |
Cake.Common.Tools.Chocolatey.ApiKey | Cake.Common.Tools.Chocolatey.ApiKey |
Cake.Common.Tools.Chocolatey.Config | Cake.Common.Tools.Chocolatey.Config |
Cake.Common.Tools.Chocolatey.Features | Cake.Common.Tools.Chocolatey.Features |
Cake.Common.Tools.Chocolatey.Install | Cake.Common.Tools.Chocolatey.Install |
Cake.Common.Tools.Chocolatey.New | Cake.Common.Tools.Chocolatey.New |
Cake.Common.Tools.Chocolatey.Pack | Cake.Common.Tools.Chocolatey.Pack |
Cake.Common.Tools.Chocolatey.Pin | Cake.Common.Tools.Chocolatey.Pin |
Cake.Common.Tools.Chocolatey.Push | Cake.Common.Tools.Chocolatey.Push |
Cake.Common.Tools.Chocolatey.Sources | Cake.Common.Tools.Chocolatey.Sources |
Cake.Common.Tools.Chocolatey.Uninstall | Cake.Common.Tools.Chocolatey.Uninstall |
Cake.Common.Tools.Chocolatey.Upgrade | Cake.Common.Tools.Chocolatey.Upgrade |
Cake.Common.Tools.DotCover | |
Cake.Common.Tools.DotCover.Analyse | Cake.Common.Tools.DotCover.Analyse |
Cake.Common.Tools.DotCover.Cover | Cake.Common.Tools.DotCover.Cover |
Cake.Common.Tools.DotCover.Merge | Cake.Common.Tools.DotCover.Merge |
Cake.Common.Tools.DotCover.Report | Cake.Common.Tools.DotCover.Report |
Cake.Common.Tools.DotNetCore | |
Cake.Common.Tools.DotNetCore.Build | Cake.Common.Tools.DotNetCore.Build |
Cake.Common.Tools.DotNetCore.Execute | Cake.Common.Tools.DotNetCore.Execute |
Cake.Common.Tools.DotNetCore.Pack | Cake.Common.Tools.DotNetCore.Pack |
Cake.Common.Tools.DotNetCore.Publish | Cake.Common.Tools.DotNetCore.Publish |
Cake.Common.Tools.DotNetCore.Restore | Cake.Common.Tools.DotNetCore.Restore |
Cake.Common.Tools.DotNetCore.Run | Cake.Common.Tools.DotNetCore.Run |
Cake.Common.Tools.DotNetCore.Test | Cake.Common.Tools.DotNetCore.Test |
Cake.Common.Tools.DupFinder | |
Cake.Common.Tools.Fixie | |
Cake.Common.Tools.GitLink | |
Cake.Common.Tools.GitReleaseManager | |
Cake.Common.Tools.GitReleaseManager.AddAssets | Cake.Common.Tools.GitReleaseManager.AddAssets |
Cake.Common.Tools.GitReleaseManager.Close | Cake.Common.Tools.GitReleaseManager.Close |
Cake.Common.Tools.GitReleaseManager.Create | Cake.Common.Tools.GitReleaseManager.Create |
Cake.Common.Tools.GitReleaseManager.Export | Cake.Common.Tools.GitReleaseManager.Export |
Cake.Common.Tools.GitReleaseManager.Publish | Cake.Common.Tools.GitReleaseManager.Publish |
Cake.Common.Tools.GitReleaseNotes | |
Cake.Common.Tools.GitVersion | |
Cake.Common.Tools.ILMerge | |
Cake.Common.Tools.ILRepack | |
Cake.Common.Tools.InnoSetup | |
Cake.Common.Tools.InspectCode | |
Cake.Common.Tools.MSBuild | |
Cake.Common.Tools.MSTest | |
Cake.Common.Tools.NSIS | |
Cake.Common.Tools.NuGet | |
Cake.Common.Tools.NuGet.Add | Cake.Common.Tools.NuGet.Add |
Cake.Common.Tools.NuGet.Init | Cake.Common.Tools.NuGet.Init |
Cake.Common.Tools.NuGet.Install | Cake.Common.Tools.NuGet.Install |
Cake.Common.Tools.NuGet.Pack | Cake.Common.Tools.NuGet.Pack |
Cake.Common.Tools.NuGet.Push | Cake.Common.Tools.NuGet.Push |
Cake.Common.Tools.NuGet.Restore | Cake.Common.Tools.NuGet.Restore |
Cake.Common.Tools.NuGet.SetApiKey | Cake.Common.Tools.NuGet.SetApiKey |
Cake.Common.Tools.NuGet.SetProxy | Cake.Common.Tools.NuGet.SetProxy |
Cake.Common.Tools.NuGet.Sources | Cake.Common.Tools.NuGet.Sources |
Cake.Common.Tools.NuGet.Update | Cake.Common.Tools.NuGet.Update |
Cake.Common.Tools.NUnit | |
Cake.Common.Tools.OctopusDeploy | |
Cake.Common.Tools.OpenCover | |
Cake.Common.Tools.ReportGenerator | |
Cake.Common.Tools.ReportUnit | |
Cake.Common.Tools.Roundhouse | |
Cake.Common.Tools.SignTool | |
Cake.Common.Tools.SpecFlow | |
Cake.Common.Tools.SpecFlow.StepDefinitionReport | Cake.Common.Tools.SpecFlow.StepDefinitionReport |
Cake.Common.Tools.SpecFlow.TestExecutionReport | Cake.Common.Tools.SpecFlow.TestExecutionReport |
Cake.Common.Tools.TextTransform | |
Cake.Common.Tools.WiX | Cake.Common.Tools.WiX.Heat |
Cake.Common.Tools.WiX.Heat | |
Cake.Common.Tools.VSTest | |
Cake.Common.Tools.VSWhere | |
Cake.Common.Tools.VSWhere.All | Cake.Common.Tools.VSWhere.All |
Cake.Common.Tools.VSWhere.Latest | Cake.Common.Tools.VSWhere.Latest |
Cake.Common.Tools.VSWhere.Legacy | Cake.Common.Tools.VSWhere.Legacy |
Cake.Common.Tools.VSWhere.Product | Cake.Common.Tools.VSWhere.Product |
Cake.Common.Tools.XBuild | |
Cake.Common.Tools.XUnit | |
Cake.Common.Xml | |
Cake.Core | Cake.Core |
Cake.Core.Diagnostics | Cake.Core.Diagnostics |
Cake.Core.IO | Cake.Core.IO |
Cake.Core.Scripting | Cake.Core.Scripting |
Cake.Incubator | |
System | System |
System.Collections.Generic | System.Collections.Generic |
System.IO | System.IO |
System.Linq | System.Linq |
System.Text | System.Text |
System.Threading.Tasks | System.Threading.Tasks |
Make this a required check for merging PR.
Currently we only get the whole buffer from VSCode on updates, so it’s hard to actually know what have been changed. Once LSP us taken into use in C# extension, we will get incremental updates.
We should make sure incremental updates don’t do script analysis and codegen when not needed.
Also, we should figure out how to improve perf when whole buffer is submitted.
I create a minimal test case.
The problem is in intellisense is not working when i reference a dll copiled with .net standard 2.0
The code is avalaible in https://github.com/gabomgp/test-case-bug-bakery
In the code linked, the build.cake is inside a folder with a project in .net standard 2.0. But, the problem is showed too when the build.cake is outside that folder, and inside the solution's folder, where there are other projects, some projects compiled with .net standard 2.0 and others with .net 4.6.
We currently assume all #r
directives are file paths.
Right now it searches recursively for Cake.Core.dll
.
We should add a more robust strategy for locating Cake.
Related to https://github.com/cake-build/omnisharp-roslyn/issues/1
No need to try downloading these everytime.
My build.cake has three #load
directives. The first one happens to be loading a script ("lib.cake") which OmniSharp is reporting errors for. (It shouldn't be giving errors for that file, but I think it's another case of #86. It's failing to find any of the types I'm using under System.Net.Http
.)
In any case, red squiggles are showing up in build.cake which do not line up with actual code and which have the error messages from lib.cake
. When I actually open lib.cake
, I see the squiggles in the exact same positions on the screen but now as you'd expect they line up with code and the error messages make sense now that they are in context.
After opening lib.cake
, the squiggles have disappeared from build.cake
.
Add metadata to *.csproj
so that it's also available in Assembly Info
So, I've got a super simple script:
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
Task("Default")
.Does(() => {
Information("Hello Cake!");
var f = GetFiles("./*.txt");
});
RunTarget(target);
I'm on a Mac.
VSCode extensions:
omnisharp-vscode 1.13.0-beta4
cake-vscode 0.9.0
In tools:
Cake.Bakery 0.1.0
Cake 0.23.0
Omnisharp log:
Starting OmniSharp server at 2017-11-1 13:55:44
Target: /Users/redth/Desktop/CakeTemp
OmniSharp server started wth Mono
Path: /Users/redth/.vscode/extensions/ms-vscode.csharp-1.13.0-beta4/.omnisharp/omnisharp/OmniSharp.exe
PID: 48695
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin"
2: StandAlone 15.0 - "/Users/redth/.vscode/extensions/ms-vscode.csharp-1.13.0-beta4/.omnisharp/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin"
CscToolPath = /Users/redth/.vscode/extensions/ms-vscode.csharp-1.13.0-beta4/.omnisharp/omnisharp/msbuild/15.0/Bin/Roslyn
CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/redth/Desktop/CakeTemp'.
[info]: OmniSharp.Cake.CakeProjectSystem
Found 1 Cake files.
[info]: OmniSharp.Cake.CakeProjectSystem
Added Cake project '/Users/redth/Desktop/CakeTemp/build.cake' to the workspace.
[info]: OmniSharp.DotNet.DotNetProjectSystem
Initializing in /Users/redth/Desktop/CakeTemp
[info]: OmniSharp.DotNet.DotNetProjectSystem
Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
No solution files found in '/Users/redth/Desktop/CakeTemp'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/redth/Desktop/CakeTemp'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.Stdio.Program
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.Stdio.Program
Configuration finished.
[info]: OmniSharp.Stdio.Program
Omnisharp server running using Stdio at location '/Users/redth/Desktop/CakeTemp' on host 48676.
Basically, I'm getting errors in the script with vscode telling me things have been declared multiple times:
Sometimes after I make some changes I get seemingly random red squigglies like this:
Eventually it goes back to the error with target being already declared.
ping @gep13
I've been following this repository for over a month now but I'm not totally sure what it's supposed to do.
Seems to me to have something to do with intellisense for case scripts but I'm not sure.
Any plans on adding a section on how to use in the readme?
Need to investigate what's causing this..
Transport is dependent on Abstractions v1.0.0, but there no such package.
See issue NuGet/Home#4337 for workaround
For reacting to file buffer changes
see example here
ping @patriksvensson
Copyright DNF
Create by e.g. Cake script. Don't use XUnit as in #9
OmniSharp is incorrectly marking ZipFile
as not found even though Cake compiles and runs fine.
I've noticed an issue recently that is kind of odd.
If I have a nuget file with some cake files loaded via #addin
, everything works correctly the first time. Once I restart vscode and Bakery comes along, I get nested tools directories which causes cake tasks to fail because it loads duplicate tasks.
My directories look like once bakery has done it's thing.
Cleaning the tools directory will solve the problem.
I've seen this in some of my open source stuff as well, I just haven't made a repro yet for it, but will try to to later today.
Create build scripts
//cc @gep13
Currently disabled.
StartProcess get's generated wrong:
Expected:
public System.Int32 StartProcess(Cake.Core.IO.FilePath fileName, Cake.Core.IO.ProcessSettings settings, out System.Collections.Generic.IEnumerable<string> redirectedOutput)
{
return Cake.Common.ProcessAliases.StartProcess(Context, fileName, settings, out redirectedOutput);
}
Actual:
public System.Int32 StartProcess(Cake.Core.IO.FilePath fileName, Cake.Core.IO.ProcessSettings settings, out System.Collections.Generic.IEnumerable redirectedOutput)
{
return Cake.Common.ProcessAliases.StartProcess(Context, fileName, settings, out redirectedOutput);
}
//cc @patriksvensson
Shoudl include interfaces, and base entitites...
No need for bakery to install tools
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.