-
Notifications
You must be signed in to change notification settings - Fork 3
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
make bincode optional for plexi_core #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change! It looks great.
one comment to add bincode as default.
locally you can also run cargo fmt
to fix the formatter.
some background: the decision to use bincode 2, even if alpha, is it provides a serialisation that's simpler to read, and has a definition, on the contrary to bincode 1, or protobuf that needs code generation.
plexi_core/Cargo.toml
Outdated
|
||
[dependencies] | ||
akd = { workspace = true, features = ["whatsapp_v1", "public_auditing"], optional = true } | ||
anyhow = { workspace = true } | ||
bincode = { workspace = true } | ||
bincode = { version = "2.0.0-rc.3", optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can leave the workspace
here. dependencies are managed at the higher level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thibmeu I tried it but encountered the following error during build
Caused by:
bincode is optional, but workspace dependencies cannot be optional
Since my goal is to make bincode crate optional for plexi_core. It seems it's required to make it a non workspace dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like this should work I think haochenuw#1
if you can confirm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what you meant by "something like this". Could you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you check out the PR haochenuw#1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. I've merged your PR :)
Dependecnies are managed by the workspace
Add bincode as a workspace dependency
Merged. Thanks again for the contribution! |
thanks! could we publish this to crates.io (if necessary, bump the version to 0.1.1)? so our internal codebase can ingest it properly |
This PR hides bincode dependency behind a feature. So that it is not a required dependency for plexi_core.
There are multiple reasons, one being that bincode 2 is not officially released and according to the dev team of bincode, the API is subject to breakages.