-
Notifications
You must be signed in to change notification settings - Fork 8
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
chore: support sync rust #760
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.
LGTM assuming we sort out the CI failures
@@ -853,7 +853,7 @@ private RustFile operationOuterModule( | |||
variables.put( | |||
"operationSendBody", | |||
evalTemplate( | |||
"$snakeCaseResourceName:L.inner.borrow_mut().$snakeCaseOperationName:L(input)", | |||
"$snakeCaseResourceName:L.inner.lock().unwrap().$snakeCaseOperationName:L(input)", |
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 assume this works in non --sync-rust
mode as well?
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.
No. smithy-dafny only works in sync mode.
You told me to do that.
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.
Yup I'm fine with that, I was just curious.
let result = resource | ||
.inner | ||
.lock() | ||
.unwrap() |
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.
Not blocking on this PR, but I think we should really have resource operations defined on the resource ref structs as well, so customers doesn't have to mess with internal things. borrow_mut()
wasn't great before in terms of encapsulation and now it's a bit worse.
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.
Yes, that would be very helpful. Especially if we could then make inner
private.
Should the be an issue or a sim or something?
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.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.