-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Go bindings - v4 specgen requires v5 image - inferrence error #19772
Comments
Thanks for reaching out, @kisamoto.
Which versions of Podman and c/image are using exactly? Can you share your |
|
@kisamoto, can you upload |
Sure :) https://github.com/kisamoto/conatiner-test Thanks for your help! |
Thanks. It builds just fine in my environment, so the problem sees to be that containers/image and other dependencies leak into pkg/bindings. So you can either install the required build dependencies (devmapper, etc) or use build tag for building the project. Can you try building with |
Compare containers/image#2066; this is almost certainly a wrong version of |
@vrothberg thanks to the pointer from @mtrmac I have identified the problem. I initially encountered this in a separate project and used the If I specifically require However if I require I think (although you can have final say) that this specific issue can be closed, however it may be worthwhile opening an additional issue to track if this error occurs in the future with newer versions of Thanks for both of your help tracking this down! |
Short-term it would probably be easiest to update c/image to include the commit that has updated for that API break, see the c/image links above for the link cluster. |
So remove the indirect dependency in Are there any risks of incompatibility between this and other containers packages? |
A friendly reminder that this issue had no activity for 30 days. |
Generally c/image tries pretty hard not to break the API within the v5 major version; but the fairly extensive Podman test suite only runs with the c/image versions Podman actually uses, so it’s not quite 100% risk-free. |
I think this can be closed as it should build with newer versions. Line 51 in 8387d2d
|
Issue Description
Using the v4 podman bindings in a basic example and trying to pull an image and start a container. When calling
go run
, getting a build error related to v5 containers/image.Steps to reproduce the issue
Steps to reproduce the issue
"github.com/containers/podman/v4/pkg/specgen"
go mod tidy
andgo run
/.gvm/pkgsets/go1.21/global/pkg/mod/github.com/containers/image/v5@v5.26.1/internal/manifest/oci_index.go:154:42: type func(a v1.Descriptor, b v1.Descriptor) bool of func(a, b imgspecv1.Descriptor) bool {…} does not match inferred type func(a v1.Descriptor, b v1.Descriptor) int for func(a E, b E) int
Describe the results you received
When running, receiving:
Describe the results you expected
Successful build and run of application with podman bindings
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
No
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: