cake-build / cake

:cake: Cake (C# Make) is a cross platform build automation system.
https://cakebuild.net
MIT License
3.91k stars 730 forks source link

Install Addins, Tools, Modules to global packages folder #2830

Open bjorkstromm opened 4 years ago

bjorkstromm commented 4 years ago

To avoid unnecessary installation of packages already located in global packages folder (e.g. ~/.nuget), we should install and consume packages from there. We could make it opt-in to start with.

One problem I see is tool resolution. We'd probably need a way to register search paths for installed tools. Then tool installer could register the path for the installed tool, located in global packages folder.

Module resolution might be tricky one... 😄

EdinaLewis commented 2 years ago

In my build setup I already use a global folder for tools, addins and modules. You can customize them with the cake command line args: -paths_tools -paths_addins -paths_modules

I just configure them as part of my build.ps1 bootstrapper.

augustoproiete commented 2 years ago

Thanks for the note @EdinaLewis but this issue is about Cake leveraging THE global folder that NuGet itself uses/manages when you install/restore packages through NuGet (e.g. dotnet restore), not a custom folder that you define yourself which, as you described, is supported already