cncf-tags / container-device-interface

Apache License 2.0
215 stars 39 forks source link

Remove the ToOCI functions from the specs-go package #208

Closed elezar closed 5 months ago

elezar commented 6 months ago

This change removes the ToOCI functions from the specs-go package. They are implemented as private toOCI functions in the cdi package instead. This means that there is no dependency on the OCI runtime spec for clients that only need a CDI spec definition.

NOTE: This is a breaking change in that the ToOCI functions no longer exist in the specs-go module, but the impact of this should be minimal and is worth the removal of the require github.com/opencontainers/runtime-spec dependency from the spec definitions.

elezar commented 6 months ago

/cc @pohly

elezar commented 5 months ago

@klihub @bart0sh as a general question, I was wondering whether we should actually REMOVE the ToOCI functions here instead (in practice we would make them private). My motivation is that these functions do not make sense in isolation and are only consumed from the Apply functions which actually update the spec.

If we do have clients that use these directly, we can consider how to better add these APIs.

klihub commented 5 months ago

@klihub @bart0sh as a general question, I was wondering whether we should actually REMOVE the ToOCI functions here instead (in practice we would make them private). My motivation is that these functions do not make sense in isolation and are only consumed from the Apply functions which actually update the spec.

If we do have clients that use these directly, we can consider how to better add these APIs.

@elezar Good point. If with this change we don't have cross-package use any more then I think making them private makes sense, since/if we don't consider them useful for external users

elezar commented 5 months ago

@klihub I have updated the latest revision with private functions. PTAL.

bart0sh commented 5 months ago

LGTM