-
Notifications
You must be signed in to change notification settings - Fork 312
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
Find a way to update serde_derive
#203
Comments
I've updated the pinned version to 1.0.58 in #207, but the core problem is not resolved. Would you be open to a PR that manually deserializes the necessary structs in cbindgen? I know there are quite a few, but I'm somewhat inclined to just see how it goes... |
@sylvestre I wrote #222 to drop the serde_derive dependency using a hack. Hopefully this resolves the issue for you. |
What's wrong with relaxing the dependency to |
If we have a dependency on proc-macro-2 with feature 'proc-macro' enabled, the cbindgen binary will crash because it can't find compiler libraries. We have a dependency on syn which uses 'proc-macro-2' with that feature disabled, so we're fine. If we update serde_derive, it will add a dependency on 'proc-macro-2' with that feature enabled causing the linked version of 'proc-macro-2' to enable that feature causing us to crash. serde_derive only needs this at build time, but cargo doesn't generate separate dependency graphs for build dependencies and runtime dependencies., so the features are unioned together. |
why does it crash, and can we make it not crash? |
It crashes because libproc-macro (a rustc internal library) is added as a linker dependency, and cbindgen can't find it when run outside of
There's no guarantee that the rustc libraries should even exist to run cbindgen either. |
I see, I think we can probably work around it in Debian since it's possible for us to keep multiple versions of the rustc internal libs around on the system. We already ship rust internal libs in
Then the @sylvestre TL;DR I'm pretty sure things with Just Work if we relax the dependency to |
Yeah this is totally fine. The dependency on |
It looks like this has been fixed with the latest nightly through rust-lang/rust#49219 🎉. This is the output after updating both serde_derive and syn:
|
Now that they fixed that, can we just use the latest serde_derive? I will try forking and if it works fine I'll send a PR. |
May want to wait for that to hit stable -- it's currently in the beta branch headed for 1.32. |
I ran into an issue where I couldn't actually build due to the version restrictions. For now I'll use my fork, which seems to be working for me on the latest nightly. |
A conflict with cbindgen exists which prevent restson to be used with it. `cbindgen` [pins `serde_derive` to `1.0.58`](https://github.com/eqrion/cbindgen/blob/44e9b2112a06e46ddda6073e237d3a56df39c3e2/Cargo.toml#L24-L27) due to mozilla/cbindgen#203 so depending on `^1.0.80` prevents using both crates together. This patch simply relaxes the dependency on `serde_derive` to `1.0`, which is API compatible with both `1.0.80` and `1.0.58`. Closes spietika#14
A conflict with cbindgen exists which prevent restson to be used with it. `cbindgen` [pins `serde_derive` to `1.0.58`](https://github.com/eqrion/cbindgen/blob/44e9b2112a06e46ddda6073e237d3a56df39c3e2/Cargo.toml#L24-L27) due to mozilla/cbindgen#203 so depending on `^1.0.80` prevents using both crates together. This patch simply relaxes the dependency on `serde_derive` to `1.0`, which is API compatible with both `1.0.80` and `1.0.58`. Closes #14
From #159
The text was updated successfully, but these errors were encountered: