-
Notifications
You must be signed in to change notification settings - Fork 249
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
Add serde::Serialize/serde::Deserialize to fluent_builders #645
Comments
@thomas-k-cameron Thanks for submitting this feature request. related: #269 |
@Velfi I don't think my proposal affect the project in the way that your concerned, should I just go ahead in implement it? |
@thomas-k-cameron The rest of the team has been out this week, we'll discuss it today. My current thoughts on this are that:
Sit tight for now, I don't want you to do any work that we might decide not to incorporate. I'll get back to you today or tomorrow. |
I spoke with the team and we're OK with you implementing this so long as you're OK with some caveats:
Given those concerns, we'd only consider merging a feature like this if we could make it clear to users of the feature that it's unstable by gating it behind something like Also, we'd really appreciate an RFC that describes what user needs this feature provides for, how users will use it, and how it would be implemented in codegen. It would also be nice to see some words on how futures updates to models would affect things. You can see our previous RFCs here. Let me know if you have any questions or if anything is unclear. |
Thank you for the update! Your RFC template seems to be gone (it gives me 404.). Also, where should I submit the RFC when it's done? Replies to the concerns of your team;
Few idea
// one that we have right now.
mod copy_object_input {
#[derive(std::clone::Clone, std::fmt::Debug)]
struct Builder {
...
}
}
mod copy_object_serde {
#[derive(std::clone::Clone, std::fmt::Debug, serde::Serialize, serde::Deserialize)]
struct WithSerde {
...
}
impl Into<copy_object_input::Builder> for WithSerde {
fn into(copy_object_input::Builder: builder) -> Self {
... pieces of code that maps fields of WithSerde to Builder struct
}
}
} In this case, the struct that implements serde traits are going to be completely isolated from the rest of the datatypes, we could even move the structs with serde traits to another crate for a higher level of isolation.
Can you give me an example? |
The RFC template can be found here: https://github.com/awslabs/smithy-rs/blob/main/design/src/rfcs/rfc_template.md RFCs get added to that same directory: https://github.com/awslabs/smithy-rs/blob/main/design/src/rfcs |
@jdisanti |
Awesome! Yeah, please do. A PR is the perfect place to discuss and merge it. Thanks! |
I just created the PR! @jdisanti |
What's the status on this effort? I have a project that could greatly benefit from this work (it's a terraform-like in pure Rust and being able to serialize wire types would greatly cut down on the amount of boilerplate I have to write). |
We have an active PR available on smithy-lang/smithy-rs#2615 . I haven't been able to work on it for the past few month, but I should be able to come back to it once I have more free time. I have been planning to start working on it again next week. FYI: there has been some issues with the unit test. Apparently, some test cases wasn't reading the environment variables properly and I couldn't get it fixed the last time that I tried. |
Is there any time frame for when this work would be finished? Being able to serde::Deserialize API responses without having to implement a intermediate From would be really useful for me. The old SDK had this functionality and implementing Serde for structs is a Interoperability recommendation from the Rust API guidelines. it seems really strange that this is not a higher priority feature for the official rust SDK. https://rust-lang.github.io/api-guidelines/interoperability.html#c-serde |
Describe the feature
It allows you to define/save models with file format supported by serde.
Once this feature is implemented you can,
Use Case
It allows you to define/save models with file format supported by serde.
Once this feature is implemented you can,
Proposed Solution
add new function
fn with_builder()
to any structs that implementsasync fn send()
.Other Information
Potential concerns
#[cfg(feature = "serde")]
or something to address the concerns that mentioned above.Acknowledgements
A note for the community
Community Note
The text was updated successfully, but these errors were encountered: