-
Notifications
You must be signed in to change notification settings - Fork 5
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
Maintenance 03-25 #50
Conversation
You must be joking. 2000 lines maintenance? Anyhow, what you're saying is that if you use |
I see the bulk is Cargo.lock. Phew! |
|
||
fmt: | ||
nix-shell --run "hn-rust-fmt && hn-rust-clippy" |
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.
Wave goodbye!
inputs = { | ||
nixpkgs.follows = "holonix/nixpkgs"; | ||
holonix.url = "github:holochain/holonix?ref=main"; |
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.
Booyakah!
You can still use it, but every time you import use hdk::prelude::{SerializedBytes, holochain_serial};
#[derive(SerializedBytes)]
struct Thing {
field: u32,
} Even though you don't use the macro directly and the error message doesn't make it clear what you did wrong. |
Got it, so making it explicit. That's great. |
This is mostly version bumps, making clippy pass on tests and generally tidying up. There is a significant change that I came here to make though.
At the moment this works:
Because both
SerializedBytes
andholochain_serial!
get imported.I find this thoroughly annoying because if you just try to write code where
SerializedBytes
is available, then you just importwherever::SerializedBytes
and get a compile error aboutholochain_serial!
not being available.Like this, you get a clearer error message telling you that
holochain_serialized_bytes
is missing. It's the approach thatserde
is currently using. The downside is that, likeserde
, we have to have it as a direct dependency wherever we use it rather than re-exporting it. So the following would be valid only ifholochain_serialized_bytes
is a crate dependency: