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

"cargo update" brings in a protobuf version (2.9.0) that doesn't compile. #173

Closed
hrydgard opened this issue Sep 30, 2019 · 14 comments
Closed

Comments

@hrydgard
Copy link
Contributor

Try to just run cargo update in the root directory, then cargo build.

Some cargo.toml dependency needs to be tightened down, or things need to be fixed to work with the new version of protobuf.

I first thought the culprit was harness/onnx-test-suite/debug-utils/Cargo.toml where it's set to "*", but no dice changing that.

@kali
Copy link
Collaborator

kali commented Sep 30, 2019

yeah, i'm on it:)

@kali
Copy link
Collaborator

kali commented Sep 30, 2019

The CI broke last night, actually, so I was aware. Thanks for the heads-up.

@hrydgard
Copy link
Contributor Author

Cool, haven't watched your CI :)

Seems that rust-protobuf accidentally pushed a busted version:
stepancheg/rust-protobuf@721e3ff

@hrydgard
Copy link
Contributor Author

Might want to consider checking in Cargo.lock by the way. The diffs aren't the prettiest, but it firmly blocks this sort of third-party breakage.

@kali
Copy link
Collaborator

kali commented Sep 30, 2019

It's a bit more subtle, the problem is I actually committed the protobuf generated files. I did that a long time ago when the protobuf generator required a working protoc on the platform, and that was raising all kind of issues on build/CI machines. And right now we have a 2.18 (or lower, haven't checked) generated files that are incompatible with the new 2.19 generator... So if you're using the protobuf suite "correctly", the version is not a bust.

Now that we have a more build.rs self-contained generated, I will maybe move back the generation in build.rs. I plan to try that this afternoon.

As for commiting Cargo.lock, it may help for the command line tool, but it is ignored for libraries, so it's only a partial fix.

@hrydgard
Copy link
Contributor Author

In that case though I should be able to get back to a locally working state by modifying your protobuf = dependencies to an older version.

But I only find

harness/onnx-test-suite/Cargo.toml:protobuf = "2.4.2"
harness/onnx-test-suite/debug-utils/Cargo.toml:protobuf = "*"
onnx/Cargo.toml:protobuf = "2.0"
tensorflow/Cargo.toml:protobuf = "2.0"

None of them are set to just 2, which would result in the automatic upgrade from 2.18 to 2.19 you are describing. Or do you mean 2.0.18 and 2.0.19 ? I tried forcing them to 2.0.18 which didn't work.

@kali
Copy link
Collaborator

kali commented Sep 30, 2019

Ho, sorry, did not realise you were actually stuck. I have pushed a "bump" branch here with a temporary fix (re-generating the files by hand). #175

It should unstuck you, while I'm doing the right thing, and getting those generated files out of git.

I think you may have been able to workaround by doing some targetted cargo updates (cargo update -p protobuf --precise 2.0.18 or something like that to revert the version bump, but now I guess you'd better try the bump branch.

@hrydgard
Copy link
Contributor Author

Cool, thanks! Bump branch seems fine.

@kali
Copy link
Collaborator

kali commented Sep 30, 2019

0.5.3 should fix it ! Thanks for your patience :)

@kali
Copy link
Collaborator

kali commented Sep 30, 2019

except... now that new version of protobuf has been yanked.

Will fix and release again

@kali
Copy link
Collaborator

kali commented Sep 30, 2019

So, 0.5.4 should do the trick... wow, what a week.

@hrydgard
Copy link
Contributor Author

Great! And the week has only just started :)

@kali
Copy link
Collaborator

kali commented Oct 4, 2019

Hey @hrydgard, are we ok to close this one ?

@hrydgard
Copy link
Contributor Author

hrydgard commented Oct 4, 2019

Yeah, sorry, it's all good now.

@hrydgard hrydgard closed this as completed Oct 4, 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

2 participants