Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:25
    Vrukshali-26 starred cake-build/cake
  • 08:03
    pascalberger starred cake-build/cake
  • 04:24
    mishmanners starred cake-build/cake
  • Jan 26 23:18
    Build #7028 passed
  • Jan 26 23:09
    Marusyk synchronize #3791
  • Jan 26 23:00
    Build #7027 passed
  • Jan 26 22:54
    Marusyk synchronize #3791
  • Jan 26 22:49
    Marusyk commented #3791
  • Jan 26 22:48
    Marusyk commented #3791
  • Jan 26 22:34
    Build #7026 passed
  • Jan 26 22:27
    Marusyk synchronize #3791
  • Jan 26 07:06
    esphas starred cake-build/cake
  • Jan 26 04:01
    Build #1048 passed
  • Jan 25 16:14
    devlead commented #3798
  • Jan 25 10:19
  • Jan 25 04:34
    sanamhub starred cake-build/cake
  • Jan 25 04:03
    Build #1047 passed
  • Jan 25 04:01
    Build #1046 passed
  • Jan 24 22:21
    Build #7025 passed
  • Jan 24 22:19
    Marusyk commented #3798
C. Augusto Proiete
@augustoproiete

@bravecobra You're welcome. You absolutely can use Cake to interact with the Registry... You just can't use the Cake abstraction to it (yet) for your use-case.

Using the .NET classes directly should work just fine e.g.

using Microsoft.Win32;

var hkcu = Registry.CurrentUser;
var subKeyNames = hkcu.GetSubKeyNames();
foreach (var name in subKeyNames)
{
    Information("Key name: {0}", name);
}
C. Augusto Proiete
@augustoproiete

@tannerwatson :point_up: January 5, 2021 4:00 PM It should be fairly easy to implement a module for Pip similar to the Npm one if you take the same approach as the Npm module of executing Pip via ProcessRunner. In that case the only dependency you'll have is Python/Pip, which users might already have on the machine, or you can instruct users to download Python from NuGet as a tool e.g.

#module nuget:?package=Cake.Pip.Module&version=x.y.z
#tool "nuget:?package=python&version=3.9.1"
#tool "pip:?package=setuptools&version=49.2.1"

// ...

Alternatively you can implement the Pip protocol yourself - which would be more elegant, but with more work involved.

Calvin Dallmore
@aeos
I might be doing this wrong, but I noticed that if you upgrade a reference in your cake build script context.Tools.Resolve(string) may find the tool from the previous version which still exists in the tools folder. Should we always clear out the tools directory before changing a package reference?
Mattias Karlsson
@devlead
Are you fetching tools using tool preprocessor directive? Think tool directive should register binaries for right version, but quite possible having multiple versions of same tool potentially causing issues.
Calvin Dallmore
@aeos
I might be abusing the feature. I have a docker template that I include as a nuget package, and then look for it using resolve in a build step.
C. Augusto Proiete
@augustoproiete

I might be doing this wrong, but I noticed that if you upgrade a reference in your cake build script context.Tools.Resolve(string) may find the tool from the previous version which still exists in the tools folder. Should we always clear out the tools directory before changing a package reference?

@aeos I ran a few tests just now and was not able to reproduce it. This is what I've done:

tools1.cake:

#tool "nuget:?package=python&version=3.9.1"

var pythonExePath = Context.Tools.Resolve("python.exe");

var exitCode = StartProcess(pythonExePath, "--version");
Information("Exit code: {0}", exitCode);

tools2.cake:

#tool "nuget:?package=python&version=3.10.0-a4&prerelease"

var pythonExePath = Context.Tools.Resolve("python.exe");

var exitCode = StartProcess(pythonExePath, "--version");
Information("Exit code: {0}", exitCode);
Using dotnet tool 1.0.0-rc0002, I get the correct tools executed:
dotnet cake tools1.cake --verbosity=Diagnostic
Executing: "C:/augustoproiete/cake-tool-1-0-0--rc0002/tools/python.3.9.1/tools/Lib/venv/scripts/nt/python.exe" --version
dotnet cake tools2.cake --verbosity=Diagnostic
Executing: "C:/augustoproiete/cake-tool-1-0-0--rc0002/tools/python.3.10.0-a4/tools/Lib/venv/scripts/nt/python.exe" --version
Nils Andresen
@nils-a
@augustoproiete could you test that with 3.8. and 3.9. - I think 3.10 could come up lexicographically before 3.9...
C. Augusto Proiete
@augustoproiete
I ran tools1 and tools2 multiple times, and in different orders.
@nils-a Sure. Will do
tools3.cake
#tool "nuget:?package=python&version=3.8.7&prerelease"

var pythonExePath = Context.Tools.Resolve("python.exe");

var exitCode = StartProcess(pythonExePath, "--version");
Information("Exit code: {0}", exitCode);
dotnet cake tools3.cake --verbosity=Diagnostic
Executing: "C:/augustoproiete/cake-tool-1-0-0--rc0002/tools/python.3.8.7/tools/Lib/venv/scripts/nt/python.exe" --version
No pyvenv.cfg file
Works as expected...
image.png
All 3 packages are there on the tools folder:
I can run any 3 cake scripts in any other, and always get the .exe of the correct version
Nils Andresen
@nils-a
@augustoproiete thanks for testing that. In my head I was thinking we're searching for the tool (hence the lexicographic idea). But @devlead had commented on that earlier: We're registering the the contents of the installed package when the #tool directive is used. That registry is queried first.
C. Augusto Proiete
@augustoproiete
@nils-a Right. That's what I had in mind too. Assuming there was a bug, I was expecting the tool to always resolving to 3.10 assuming it was doing a simple string order by in the paths, but that's not the case. Let's see if @aeos can come up with a repro
Darrell
@DTTerastar
I tested my stuff on 1.0rc0001 and rc0002 and the lack of Arguments.GetArgument is a big blocker: Error: System.AggregateException: One or more errors occurred. (Method not found: 'System.String Cake.Core.ICakeArguments.GetArgument(System.String)'.)
---> System.MissingMethodException: Method not found: 'System.String Cake.Core.ICakeArguments.GetArgument(System.String)'.
at Cake.Utils.Prompt.PromptAliases.ArgumentT
at Submission#0.ArgumentT
The fact 0.38 and 0.37 don't have a GetArguments also means I can't use start using that or else my addon will fail on that version.
Would a PR with a GetArgument being a call to GetArguments().SingleOrDefault() be met w/ happiness or disdain? It can be Obsolete from the start.
Darrell
@DTTerastar
nm, moved to github discussion
C. Augusto Proiete
@augustoproiete
Tanner Watson
@tannerwatson
@augustoproiete thank you! (regarding a pip module) and sorry for the late reply. I'll give it a shot over the weekend
norgie
@norgie
bilde.png
Hi.
Has anyone come across this? If so, how did you solve it? If not, any suggestions as to how I can resolve it?
Nils Andresen
@nils-a
@norgie have you seen cake-build/cake#1904 ?
also, are you aware that we're currently moving away from gitter and into https://github.com/cake-build/cake/discussions/ ? ;-)
norgie
@norgie
@nils-a cake#1904 is interesting given that this project is the only one that fails while the other projects who are also using Cake work as expected.
As for moving to cake\discussions on github. Thx for the heads-up.
We've also been using Cake since early days and never encountered this error before.
norgie
@norgie
Adding [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12did indeed solve the issue. Strange that we haven't encountered this before.
Marek Pavlu
@ipavlu
Hi, Cake Modules, I created one, installed it simple way, also through private nuget feed.z
But it seems I have issues with nuget dependencies in the module. Installation installs just package itself, not dependencies which are missing in the nugget package as well
Dmitry Lukyanov
@dmitry_lukyanov_gitlab
Hey, I'm using DotNetCoreTool to create a nuget.config file: DotNetCoreTool(projectPath, "new nugetconfig"), can I somehow configure it? for example, I want to change the content of the created file. I guess I can try to do it with something like DotNetCoreToolSettings.WithProperty, but the constructor of DotNetCoreTool doesn't allow passing this settings
Dmitry Lukyanov
@dmitry_lukyanov_gitlab
Also, is it possible to add a new XML node via XmlPoke. I see here https://cakebuild.net/api/Cake.Common.Xml/XmlPokeAliases/A9DB73CD updating and removing. Attempts to make the same steps for "adding" were with no luck
Dmitry Lukyanov
@dmitry_lukyanov_gitlab
3 (last one :) ). If I need to call dotnet add package .. for my c# project, what is the best way to do it? It seems that NuGetAdd and NuGetInstall make different things
Marek Pavlu
@ipavlu
Installing module puts dependencies to module specific folder, from nuget feed module installs dependencies into Modules\ModuleName.Version\ModuleName
and dependencies go to Modules\ModuleName.Version\dependency_a, Modules\ModuleName.Version\dependency_b, Modules\ModuleName.Version\dependency_c
This happens during bootstrap.
build.ps1 fails, as it is unable to understand dependencies in way they are stored in module folder.
cake-contrib-bot
@cake-contrib-bot
@/all Version 0.2.0 of the Cake-Rider plugin has just been released, this will be available here https://plugins.jetbrains.com/plugin/15729-cake-rider, once the version is revied and approved.
Toby Henderson
@holytshirt
Evening all, I can't seem to find the documentation an alias for which operating system is the script running on
want to a an
if windows do x if mac do y
Pascal Berger
@pascalberger
@holytshirt See the Platform aliases
Toby Henderson
@holytshirt
@pascalberger argh thank you, perfect, google fu failed me
Pascal Berger
@pascalberger

@/all A quick reminder that we suggest to use GitHub discussions as prefered communication channel. GitHub discussions makes it easier to keep track of discussions in a structured way, especially if multiple discussions are happening at the same time. It also allows to search for previous discussion, which can be a helpful resource. GitHub discussions should be a place for the community like here, and we would be more than happy if community would chime in to discussions over there.

We won't delete this channel, but discussions might move to the new place which is available at: https://github.com/cake-build/cake/discussions

C. Augusto Proiete
@augustoproiete

@/all We are starting to prepare our next release, 1.0.0-rc0003 (https://github.com/cake-build/cake/milestone/75?closed=1) :rocket::cake:.

This is your friendly reminder that if you haven't pinned to a specific version of Cake, you should do it now 😉 https://cakebuild.net/docs/writing-builds/reproducible-builds

cake-contrib-bot
@cake-contrib-bot
@/all Version 1.0.0-rc0003 of the Cake has just been released, https://www.nuget.org/packages/Cake.
C. Augusto Proiete
@augustoproiete
@/all Cake v1.0.0-rc0003 has been released :rocket: :cake: See details in this blog post: https://cakebuild.net/blog/2021/01/cake-v1.0.0-rc0003-released
Mattias Karlsson
@devlead
@/all We will soon start preparing for the 1.0.0 release of Cake. So this is a friendly reminder to pin your Cake version.