oras-project / oras-go

ORAS Go library
https://oras.land
Apache License 2.0
168 stars 90 forks source link

Move display package from oras client library to oras-go #774

Open Raikerian opened 1 month ago

Raikerian commented 1 month ago

Hi everyone.

I am currently working on a project where I have implemented a custom ORAS content store to handle file packaging according to my specific requirements. Due to this customization, I find it challenging to use the default commands provided by the ORAS client library, such as oras push, as there is no support for plugin or custom store injection in these commands.

While exploring the client library, I found many useful packages. One package that stands out for my current needs is the tracker/status functionality for objects being pushed or pulled, found here: https://github.com/oras-project/oras/tree/main/cmd/oras/internal/display

Proposal: I believe it would be beneficial to have the push/pull tracker functionality decoupled from the CLI, making it accessible to users of the library who, like me, have custom content stores.

I am open to contributing to this effort if needed and would also appreciate any guidance or existing workarounds for using oras push with a custom store.

shizhMSFT commented 4 weeks ago

Hi @Raikerian, we split oras into the oras CLI and the oras-go library as discussed in https://github.com/oras-project/oras/issues/181 many years ago.

The purpose of the oras-go library is to only contain core functionalities with as few dependencies as possible. The oras-go library is supposed to be stable and suitable for all adopters.

On the other hand, the oras CLI has no such restrictions. It can have any necessary dependencies as it wants. However, oras CLI only maintains the semantic versioning for the CLI interface. In other words, packages in the oras CLI may change commit by commit.

Therefore, we will not consider moving the internal package display from the oras CLI to the oras-go library due to the above facts. Nonetheless, I would suggest forking the oras CLI to use a custom store.