question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

paket update slow with empty `paket.references` files

See original GitHub issue

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).

  1. 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.

  2. Define a paket.dependencies file

  3. Create a paket.references file per project. The references file can be empty. There should also be a global paket.references file

  4. Add paket to the project directory

  5. Run paket update command 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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
forkicommented, 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.

1reaction
forkicommented, Jan 19, 2018

Can you please upload a zip with that repro? I don’t think we have a way to exclude projects, but maybe we can make it faster

Am 18.01.2018 17:43 schrieb “Ivaylo Slavov” notifications@github.com:

Description

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. 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. 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. 2.

Define a paket.dependencies file 3.

Create a paket.references file per project. The references file can be empty. There should also be a global paket.references file 4.

Add paket to the project directory 5.

Run paket update command 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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/3000, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNBAwC5DBH9HZIOV1XyxNA4xBB0efks5tL3RTgaJpZM4RjN9m .

Read more comments on GitHub >

github_iconTop Results From Across the Web

The paket.references files
Paket determines the set of dependencies that are to be referenced by each MSBuild project within a directory from its paket.references file.
Read more >
Paket and the .NET SDK / .NET Core CLI tools (dotnet CLI ...
To create an empty paket.dependencies file, just run: ... After paket.references files files have been created, run dotnet restore (see restoring packages) ...
Read more >
I can't use libraries installed with paket tool
The problem might be caused because of paket's default framework restrictions and your dotnet version mismatch.
Read more >
functional – Composite Thrashing Code
init: Creates an empty paket.dependencies file in the working directory. ... a package from your paket.dependencies file and all paket.references files.
Read more >
Getting Started with Paket – Part 1 - The Cockney Coder
In this case, Paket would have downloaded the packages etc., but simply not added the references to the project. You could have then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found