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

Build fails if buildkit is enabled on latest version 0.18 #481

Open
paul-hansen opened this issue Nov 18, 2024 · 5 comments
Open

Build fails if buildkit is enabled on latest version 0.18 #481

paul-hansen opened this issue Nov 18, 2024 · 5 comments

Comments

@paul-hansen
Copy link
Contributor

If the buildkit feature is enabled, bollard v0.18.0 fails to compile with the following error:

error[E0433]: failed to resolve: could not find `packet` in `filesync`
 --> /home/paul/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bollard-0.18.0/src/image.rs:3:45
  |
3 | use bollard_buildkit_proto::moby::filesync::packet::file_send_server::FileSendServer as FileSendPacketServer;
  |                                             ^^^^^^ could not find `packet` in `filesync`

error[E0433]: failed to resolve: could not find `packet` in `filesync`
  --> /home/paul/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bollard-0.18.0/src/grpc/mod.rs:47:45
   |
47 | use bollard_buildkit_proto::moby::filesync::packet::file_send_server::{
   |                                             ^^^^^^ could not find `packet` in `filesync`

error[E0223]: ambiguous associated type
   --> /home/paul/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bollard-0.18.0/src/grpc/mod.rs:262:26
    |
262 |     ) -> Result<Response<Self::DiffCopyStream>, Status> {
    |                          ^^^^^^^^^^^^^^^^^^^^
    |
help: if there were a trait named `Example` with associated type `DiffCopyStream` implemented for `FileSendPacketImpl`, you could use the fully-qualified path
    |
262 |     ) -> Result<Response<<FileSendPacketImpl as Example>::DiffCopyStream>, Status> {
    |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some errors have detailed explanations: E0223, E0433.
For more information about an error, try `rustc --explain E0223`.
error: could not compile `bollard` (lib) due to 3 previous errors

System Info

EndeavorOS (arch based distro)
rustc 1.82.0 (f6e511eec 2024-10-15)

Reproduction Steps

cargo new --bin test-bollard
cd test-bollard
cargo add bollard --features=buildkit
cargo build

Terminal session recording of running the above steps: https://asciinema.org/a/MSsTCpYvn2fWEPOU47JsN0egM

@fussybeaver
Copy link
Owner

Thanks for reporting... I think we need a new version of the protobuf sub-crate. Would be useful if we had a test case for this.

@paul-hansen
Copy link
Contributor Author

paul-hansen commented Nov 18, 2024

I was just about to comment that I think that's all it is 👍

I was able to workaround it by adding this to my Cargo.toml:

[patch.crates-io]
bollard-buildkit-proto = {git = "https://github.com/fussybeaver/bollard.git", rev="3a770d5"}

@paul-hansen
Copy link
Contributor Author

paul-hansen commented Nov 18, 2024

Would be useful if we had a test case for this.

I'm actually not sure how to test for this specifically, since in this case building it from the repo worked fine, it only failed on the crates.io version. Maybe the best we could do is script the release process so it isn't forgotten? Not sure if there's a better way?

Happy to help with this when I can if you have ideas. Adding a workflow for testing features is probably still a good idea even if it wouldn't catch this case, happy to help with that too.

@fussybeaver
Copy link
Owner

Yeah, either script the release, or have some docs... it's not always that obvious how to handle upstream changes though, so perhaps it'd be best as docs.

@fussybeaver
Copy link
Owner

Fixed in v0.18.1 but keeping this open to remind myself to write some release docs

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

2 participants