Repository navigation
Description
Description
This is a quite specific to my own use-case request that should be rather seen as a potential improvement.
I have a C# project folder with a number of .csproj files inside. I am using paket to manage my dependencies for those projects -- I can have separate dependencies per project because I can have a ProjectName.csproj.paket.references file for each project. I also have a global paket.references file. However, I want some projects to be totally ignored by paket because it wastes too much time hanling them, even if there is nothing to be installed as a dependency. So far I am trying to use an empty paket.references file per such project, but regardless of that, it takes a somewhat significant amount of time for Paket to realize there is nothing to do with that project. As these projects are about 5-6 or more, the paket update command takes quite a long time to complete.
It would be useful to know if there is a way to make Paket ignore certain projects in the given setup. I know that most people would advice me to change my project file organization, but I cannot because tools like the Unity engine create a bunch of .csproj files in the working directory which is nothing I can help with. Furthermore, for me wanting to create a package of the unity project contents, I must as well place the packaging project along, therefore increasing the number of projects paket needs to loop trough.
Repro steps
The issue is reproducible with Paket version 5.131.x (the latest released version up to this date).
-
Create a directory and make a number of csproj files there. You could create a single C# project and replicate the .csproj file a number of times, to make them at least 8.
-
Define a paket.dependencies file
-
Create a paket.references file per project. The references file can be empty. There should also be a global paket.references file
-
Add paket to the project directory
-
Run
paket updatecommand from a terminal within the project directory
Expected behavior
I'd expect the project with empty paket references file to be processed quite faster, or to have a way to tell paket not to process them
Actual behavior
It takes quite a while for paket to handle each project
Known workarounds
None I know of.
Activity
forki commentedon Jan 19, 2018
stackh34p commentedon Jan 19, 2018
I hope a git repo would do as well. I have made an example with the simplest setup I could think of which illustrates the problem. I have made 2 folders with nearly none and with a few empty paket.references files, thus illustrating the slowdown.
In this example, we have a minor slowdown for about 11 seconds for having 8 empty paket.references files. The more they become, the slower the processing. If we use multiple times the
paket updatecommand to individually address different dependency groups, the slowdown would be sensed even further.The project readme has some instructons on how to test this, no need for visual studio, just a bash terminal could do.
enricosada commentedon Jan 24, 2018
Closing. Dupe of #2054
[-]How should I tell paket to skip certain projects when there are more than one in a single folder?[/-][+]paket update slow with empty `paket.references` files[/+]enricosada commentedon Jan 24, 2018
Reopen for the performance issue of empty paket.references
The ignore of path is tracked in #2054
forki commentedon Feb 12, 2018
ok took a look at this. the problem is that paket still thinks it needs to maintain the csproj. So it will parse it and try to remove paket references from ealier runs.
Just think about the case when you have a package in the references file and then remove it. Paket needs to remove it from the csproj as well.
stackh34p commentedon Feb 12, 2018
@forki I see. Maybe this request is not correctly addressed as a paket concern, and maybe it is a very specific case of my own. It would be better if paket is able to properly maintain the package dependencies and without it processing the project one may experience some strange issues -- like what one happened to me once when I merged a project from version control and the merged version referred to non-existent packages.... Using
paket restorewould fix that if it works like it does now, thus I have an idea of how it could get wrong if the paket update/restore commands do not do their job properly.Anyway, I have devised a workaround for my case, it is quite neat if you're using bash or git bash:
So. with the above approach in mind and the argumentation for the importance of the current behavior, I feel fine to close this issue.
test: don't audit the packages of the integration test scenarios