Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: gating different drivers behind build tags #296

Closed
cyphar opened this issue Jun 29, 2017 · 4 comments
Closed

*: gating different drivers behind build tags #296

cyphar opened this issue Jun 29, 2017 · 4 comments

Comments

@cyphar
Copy link
Contributor

cyphar commented Jun 29, 2017

I'm not sure if we've discussed this before, but if we want to have a library that implements all manner of image formats and schemes we need to make it possible for users of this library to opt out of the dependencies if they're not going to use a particular driver.

For example, if I want to build skopeo without ostree support that is currently not possible. Should we add noostree and similar buildtags to each of the image schemes? Or do you feel that'll cause issues?

@runcom
Copy link
Member

runcom commented Jun 29, 2017

I'm +1 on this.

@mtrmac
Copy link
Collaborator

mtrmac commented Jun 29, 2017

For example, if I want to build skopeo without ostree support that is currently not possible.

It actually is possible now, with #290 . (To be fair, vendored into skopeo only yesterday, and undocumented in skopeo. We should probably add that documentation—or containers/skopeo#359 vaguely talks about autodetection.)

Should we add noostree and similar buildtags to each of the image schemes?

(As a side note, many users of the library who need only specific transports can import only those transports and minimize dependencies. Only explicitly pulling in alltransports, whether as such or for alltransports.ParseImageName, gets all of them.)

I’m fine with allowing to opt out of the transports with non-trivial dependencies; I would be less enthusiastic (though probably could still be persuaded) about a blanket policy of making all transports optional, even the self-contained ones like dir: or oci:. It seems to me that the transport:… syntax provided by containers/image/transports/alltransports is more useful to users when they can generally expect the syntax to work the same everywhere, without bothering about which individual tools (and specific builds/packages of those tools) actually support which transports.

@cyphar
Copy link
Contributor Author

cyphar commented Jun 29, 2017

Ah, I didn't see that PR @mtrmac. But yes, my suggestion only applies for things with non-trivial dependencies.

@rhatdan
Copy link
Member

rhatdan commented Apr 25, 2019

I believe we have this now, and this is a rather old issue, I am closing please reopen if you think we should still work on this.

@rhatdan rhatdan closed this as completed Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants