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

Release 0.22 build from cargo fails after the release of 0.23 #211

Closed
tkasu opened this issue Jan 15, 2020 · 11 comments
Closed

Release 0.22 build from cargo fails after the release of 0.23 #211

tkasu opened this issue Jan 15, 2020 · 11 comments

Comments

@tkasu
Copy link

tkasu commented Jan 15, 2020

I'm having problems building my project that is using release 0.22.

It seems that problems started after the release of rust-rdkafka 0.23 and rdkafka-sys 1.3.1.

   Compiling rdkafka-sys v1.3.1
  ...
   Compiling rdkafka v0.22.0
error[E0425]: cannot find function `primitive_to_rd_kafka_resp_err_t` in crate `rdsys`
   --> /Users/tkasu/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/rdkafka-0.22.0/src/client.rs:411:22
    |
411 |     let err = rdsys::primitive_to_rd_kafka_resp_err_t(err)
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `rdsys`

Release 0.22 is fetching rdkafka-sys 1.3.1 from which the function primitive_to_rd_kafka_resp_err_t has been removed.

@benesch
Copy link
Collaborator

benesch commented Jan 15, 2020

That's unfortunate. Perhaps we need to be using strict version requirements in rdkafka. For now you should be able to work around the issue by adding a strict dependency on the correct version of rdkafka-sys to your project:

rdkafka = "0.22.0"
rdkafka-sys = "=1.2.2"

Alternatively perhaps we need to be bumping the major version of rdkafka-sys whenever we release a new version, since most versions involve semver breaking changes—but then we'd lose the parity with upstream's versioning. @fede1024 do you have thoughts?

@ghost
Copy link

ghost commented Jan 16, 2020

@benesch Why don't you use tilde requirements to specify rust-rdkafka's dependency on rdkafka-sys?

This way you should be able to prevent minor version upgrades.

@tkasu
Copy link
Author

tkasu commented Jan 16, 2020

@benesch thanks that works! Nevertheless, if this could be handled in rdkafka's dependencies it could potentially help at least new rustaceans like me in the future =).

@benesch
Copy link
Collaborator

benesch commented Jan 16, 2020

@benesch Why don't you use tilde requirements to specify rust-rdkafka's dependency on rdkafka-sys?

I'm worried that's not sufficient! I'm not sure rdkafka upstream adheres to semver.

@benesch
Copy link
Collaborator

benesch commented Jan 16, 2020

@benesch thanks that works! Nevertheless, if this could be handled in rdkafka's dependencies it could potentially help at least new rustaceans like me in the future =).

Yes, absolutely! Thanks for raising the issue. I'll leave this open until it's sorted out on our end.

benesch added a commit that referenced this issue Apr 10, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue #211.
@benesch
Copy link
Collaborator

benesch commented Apr 10, 2020

Ok, I think the solution here is to allow rdkafka and rdkafka-sys to be selected independently. If we make rdkafka-sys properly follow semver, then rdkafka just needs to express the minimum version of rdkafka-sys that it is compatible with, and we should be good to go.

#234 starts us down that road.

@jan-auer
Copy link

Once #234 is released, would it be possible to release 0.22.1 that pins to rdkafka-sys 1.2.2? That way projects stuck on futures 0.1 can still run cargo update.

@benesch
Copy link
Collaborator

benesch commented Apr 15, 2020

Yeah, that's not a bad idea. Ideally we'd yank 0.22.0, but that might be unnecessarily disruptive.

@jan-auer
Copy link

Ideally we'd yank 0.22.0, but that might be unnecessarily disruptive.

Agreed, since there might be repositories with lockfiles checked in that still work (like ours).

benesch added a commit to benesch/rust-rdkafka that referenced this issue Apr 19, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 2, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 3, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 3, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 3, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 3, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 3, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 3, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 6, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 6, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 6, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
benesch added a commit to benesch/rust-rdkafka that referenced this issue May 6, 2020
Also allow rdkafka and rdkafka-sys to be versioned independently by
making rdkafka-sys follow SemVer. This will fix future scenarios like
the one described in issue fede1024#211.
@benesch
Copy link
Collaborator

benesch commented Jul 8, 2020

Agreed, since there might be repositories with lockfiles checked in that still work (like ours).

As I understand it, yanking doesn't prevent existing lockfiles from downloading that crate! It just prevents future folks from picking up the version via cargo update.

@benesch
Copy link
Collaborator

benesch commented Jul 10, 2020

Ok, thanks to @fede1024, there's a release of 0.22.1 that pins to rdkafka-sys 1.2.2. Thanks for reporting, and sorry about the breakage.

Going forward, the new versioning scheme introduced in #240 ensures both rdkafka and rdkafka-sys follow semver and will allow mixing and matching versions of rdkafka/rdkafka-sys, semver permitting.

@benesch benesch closed this as completed Jul 10, 2020
ftieben added a commit to ftieben/kafka_examples that referenced this issue Apr 16, 2023
add rdkafka-sys = "=1.2.2" as dependencie cause newer versions dont provide primitive_to_rd_kafka_resp_err_t

fede1024/rust-rdkafka#211
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

3 participants