containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
8.2k stars 611 forks source link

Build tags for optional features? #3463

Open apostasie opened 2 months ago

apostasie commented 2 months ago

What is the problem you're trying to solve

Optional / experimental features (IPFS, stargz, nydus, overlaybd, etc) do introduce a fair amount of code and a number of tests that implementors may not be interested in (wether with straight nerdctl builds, or custom cli based on the codebase).

This is especially impactful as IPFS/stargz testing for example is very flimsy and failing builds a lot.

Suggestion here would be to introduce build tags for these to make it either to not compile support in / not test it.

WDYT?

Tagging @AkihiroSuda

Describe the solution you'd like

na

Additional context

No response

AkihiroSuda commented 2 months ago

NERDCTL_EXPERIMENTAL=0 (run-time env var) isn't enough?

apostasie commented 1 month ago

NERDCTL_EXPERIMENTAL=0 (run-time env var) isn't enough?

That works only for the nerdctl binary right? Custom cli using the repo as a library will not benefit from it.

The concern outlined in this ticket is not for end-users using the vanilla nerdctl, but for embedders / developers of custom clis.

Anyhow, this is somewhat low-priority. If you don't like it, we can close - otherwise I may look into it later.