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.

Use Paket as library instead of CLI

See original GitHub issue

I am in a situation where I have a list of dependencies for a set of related projects, but those dependencies are expressed in code, not in files. I would like to generate the flat list of transitive dependencies for these project dependencies (i.e. what would go into the lock file) and also install that list of dependencies locally; preferably without needing to generate packet.dependencies orpacket.references files first.

Essentially I want to be able to use Paket as a library where the inputs are provided via code, rather than as a CLI where the inputs are provided by files.

I don’t think this capability exists today. At least, I cannot find any documentation of it, and looking through the source code, it doesn’t appear that the appropriate abstractions exist to enable it (although my understanding of F# is not very strong). If I am wrong, please point me to any documentation or samples that show how to do this.

If it does not exist, but the team would be willing to have it added, I am happy to contribute towards that effort, although I will certainly need help.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
eatdrinksleepcodecommented, May 28, 2018

For Paket’s typical intended use case, the file API is fine. I happen to have a case where I am getting direct dependency requirements from another source, and I would like to know the transitive closure of resolved dependencies. I am well aware of the deficiencies in the way Nuget resolves transitive dependencies, and so I thought I would turn to Paket instead.

Using Paket via files is not an insurmountable obstacle, it’s just an unnecessary impediment. It also forces me to create my own model for how Paket’s files work. If such models already exist in Paket (and I believe they do), I would rather use those than create my own (which would likely be challenging to match perfectly). And if I am using Paket’s own models, it seems silly to have to write them out to files just so that Paket can read them in again.

0reactions
forkicommented, May 29, 2018

What if you want to integrate into systems without filesystem apis

I would say: out of scope for paket.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Learn how to use paket
You edit the paket.dependencies and paket.references files by hand as needed. When you run a paket command, it will generate the paket.lock file....
Read more >
What is Paket?
Paket is a dependency manager for .NET projects. Paket enables precise and predictable control over your dependencies. With Paket, you can reference: NuGet ......
Read more >
Why I use paket now
Paket instead only supports one package version per solution, which makes a lot more sense. This means Paket doesn't store the packages in...
Read more >
Go project structure to produce library and cli with the same ...
How to setup project structure to produce library and cli with same name in single repository? Suppose my project name is project ....
Read more >
How can I make my managed NuGet package support C++ ...
I have made a NuGet package that works well when I use it from a C# project. It contains a DLL in the...
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