Use Paket as library instead of CLI
See original GitHub issueI 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:
- Created 5 years ago
- Comments:9 (7 by maintainers)
Top GitHub Comments
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.
I would say: out of scope for paket.