Opion to list all versions of packages

Using tap.exe package list -r “some repo” only rteturns the newest version of all packagesin the repo. How can I get all versions? The -a Option only works for a single package. Shouldnt -a also work here: tap.exe package list -a

Hi @GoranJohnsson,

I can confirm what you see. I think it should, but somehow it does not work…

At the same time, I can see why it might not be a good idea to query everything from the repo easily since that would be a huge query.

What is the reason for doing this?

Need this in order to populate a list with all available packages in a custom packet manager (since the PWTA PM cannot manage an arbitrary OpenTAP installation and not forcing the system admin to use the CLI)
So is this limitation a bug in tap.exe?

Hi @GoranJohnsson ,

As Rolf said, this would be a huge query (and extremely slow). This is probably not what you want.

The way PWTA PM and the online package repository (packages.opentap.io) does it is to fetch the latest version of all packages to create the initial list, and only request all versions of a particular package on demand (when a package from the list is selected). I would recommend this approach instead.

It sounds like you are using the tap CLI to get the list of packages, and then parsing the output. I would advice against this. We make no promises about the output formatting of CLI actions. Consider using the C# API instead. The source code of the list CLI action may be instructive.

You can also take a look at the repository nuget client which we recently published to make it easier for C# applications to interface with the package repository: NuGet Gallery | OpenTAP.Repository.Client 4.26.1

I hope this helps! I think a package manager for managing multiple installations on the same system is a good idea. I look forward to see what you come up with

1 Like

Yes I’m using the CLI and parse the output, works pretty well now. I would prefer to use the API but found this part hard to understand and not so documented. i will however look into it again. Thanks

1 Like

If you need an example of how to make a package manager, you can check out the code for the TUI. It implements a full package manager: