-
Notifications
You must be signed in to change notification settings - Fork 195
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
RFC: Serialization and deserialization #1944
RFC: Serialization and deserialization #1944
Conversation
There was a mistake in one of the sentences. so I updated. |
I want to give you a big congratulation for being the first external customer to submit an RFC! |
I always wanted to make a contribution to a reputable open source project. I'm so happy to be the first person to ever submit a RFC! looking forward to your feedback! |
I left a bunch of comments. I'll check back next week. Let me know if any of my questions don't make sense. |
@Velfi I think I was able to answer to your question; Please let me know if something is wrong with it. |
It would also be good if your RFC paid some thought to how it would interact with the smithy required and default traits. I believe that our builders will never have non- |
I really appreciate your feedback. I think I'd love to spend more time on fixing the problem. |
RFCs are a request for comments. It's ok if it's not perfect right at the start. Just leave it open and keep improving it. |
Hi, I just pushed some changes but it's still work in progress and there are still some work to do before it's ready for reviews. Just letting you know... |
...en-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt
Outdated
Show resolved
Hide resolved
rust-runtime/aws-smithy-types/test_data/serialize_document.json
Outdated
Show resolved
Hide resolved
I just want to let you know that I just pushed some changes. RFC updateI added a section to discuss about data types that we should skip when serializing/deserializing. Changes to kotlin codesExcept for few crates that uses data types from For example, aws_sdk_s3::client::GetObject now has these methods. I believe that we can easily remove them if you decide to reject this RFC in future. I didn't put a lot of thoughts into the name of the methods and it's docs. #[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetObject {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_object_input::Builder,
}
impl GetObject {
/// Creates a new `GetObject`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// This method replaces the existing parameter set on this data with the 2nd argument.
/// Existing parameters set on this data will be lost.
#[cfg(any(
feature = "unstable-serde-serialize",
feature = "unstable-serde-deserialize"
))]
pub fn replace_parameter(
&mut self,
new_parameter: crate::input::get_object_input::Builder,
) {
let _ = std::mem::replace(&mut self.inner, new_parameter);
}
/// This method sends a request with given input.
/// Method ignores any data that can be found in the builder type held on this struct.
#[cfg(any(
feature = "unstable-serde-serialize",
feature = "unstable-serde-deserialize"
))]
pub async fn send_with_input(
self,
input: crate::input::get_object_input::OutputShape,
) -> std::result::Result<
crate::output::GetObjectOutput,
aws_smithy_http::result::SdkError<crate::error::GetObjectError>,
> {
let op = input
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
} |
I've been quite busy this week. I'm hoping to have time next week to review your latest changes. Thanks again for working so hard on this. |
@jdisanti I'd love to wait for him to clarify things. |
Hey @thomas-k-cameron, I wanted to let you know that our team won't be as available over the next week or so what with the holidays and all. Thanks again for all you hard work on this! I'll be around next week to answer questions and check if anything else needs to happen before we merge this accepted. I think we're pretty much there. Happy Holidays. |
@Velfi |
Happy new year! |
done, let me know if that makes sense |
@rcoh I left the comment, I appreciate another follow up. Sorry for bothering you again and again, but I want to make sure that we are on the same pages. |
Section is deleted in response to the discussion smithy-lang#1944 (comment)
The thing that was unresolved is now fixed. |
@thomas-k-cameron Sure thing. I'm good to merge this, but let me confirm with @rcoh before doing so. Would you mind fixing the merge conflict? |
@Velfi |
OK, I've set this RFC to merge. Congratulations @thomas-k-cameron! Once it's merged, feel free to start requesting feedback on the implementation PR. Breaking the implementation PR up into smaller pieces where possible will ensure reviews go quicker. |
Gotcha! Do you happen to have a api document or guideline for developing the code-gen? |
You can get a high level overview of the SDK and codegen by watching this presentation I made. Beyond that, we don't really have resources that are available to external contributors. I think that the best way forward would be for you drill down on the changes checklist items you wrote. Most of the items can be their own PR. Add feature gate for
|
* commit RFC * commit * Delete rfc0023_serialization_and_deserialization.md * fix formatting * #1944 (comment) * #1944 (comment) * applied grammarly pre-commit * better example wip * FIX * #1944 (comment) #1944 (comment) #1944 (comment) * add examples for output's builer * fixes * fixing unstable feature gate snippet * Update rfc0028_serialization_and_deserialization.md Section is deleted in response to the discussion #1944 (comment) * file name fix * Update rfc0030_serialization_and_deserialization.md #2183 (comment) * Update rfc0030_serialization_and_deserialization.md
* commit RFC * commit * Delete rfc0023_serialization_and_deserialization.md * fix formatting * smithy-lang/smithy-rs#1944 (comment) * smithy-lang/smithy-rs#1944 (comment) * applied grammarly pre-commit * better example wip * FIX * smithy-lang/smithy-rs#1944 (comment) smithy-lang/smithy-rs#1944 (comment) smithy-lang/smithy-rs#1944 (comment) * add examples for output's builer * fixes * fixing unstable feature gate snippet * Update rfc0028_serialization_and_deserialization.md Section is deleted in response to the discussion smithy-lang/smithy-rs#1944 (comment) * file name fix
* commit RFC * commit * Delete rfc0023_serialization_and_deserialization.md * fix formatting * smithy-lang/smithy-rs#1944 (comment) * smithy-lang/smithy-rs#1944 (comment) * applied grammarly pre-commit * better example wip * FIX * smithy-lang/smithy-rs#1944 (comment) smithy-lang/smithy-rs#1944 (comment) smithy-lang/smithy-rs#1944 (comment) * add examples for output's builer * fixes * fixing unstable feature gate snippet * Update rfc0028_serialization_and_deserialization.md Section is deleted in response to the discussion smithy-lang/smithy-rs#1944 (comment) * file name fix * Update rfc0030_serialization_and_deserialization.md smithy-lang/smithy-rs#2183 (comment) * Update rfc0030_serialization_and_deserialization.md
Motivation and Context
RFC for Implementation of Serialization/Deserialization on some datatypes.
relevant issues.
Add serde::Serialize/serde::Deserialize to fluent_builders #645
awslabs/aws-sdk-rust#645
[request]: Serialize/Deserialize of models for Lambda events #269
awslabs/aws-sdk-rust#269
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.