-
Notifications
You must be signed in to change notification settings - Fork 6
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
Remove Struct from Types #209
Conversation
include Hearth::Structure | ||
|
||
MEMBERS = %i[ |
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.
What about having Hearth::Structure define a class method for members
which would then setup the attr accessors (and set the MEMBERS). Eg:
class MyType
include Hearth::Structure
members %i(member1 member2)
end
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 was avoiding adding new methods because then those have to be reserved. Class method may be ok too.
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.
We can't do this apparently because we require a constant and it ends up being dynamic.
...n/src/main/java/software/amazon/smithy/ruby/codegen/generators/types/StructureGenerator.java
Outdated
Show resolved
Hide resolved
...n/src/main/java/software/amazon/smithy/ruby/codegen/generators/types/StructureGenerator.java
Outdated
Show resolved
Hide resolved
// TODO: not sure if any of this belongs here | ||
if (target.hasTrait(StreamingTrait.class)) { | ||
// TODO: determine if input or output and set accordingly | ||
// String is a hack because of protocol tests comparing blob? FIXME |
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.
Where do we compare the blob in the protocol tests?
I think on output we handle streaming correctly by reading.
But I guess on input when we create our param inputs we don't check for streaming... maybe we need to there?
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 can't find a better way around this.
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.
This will require downstream (V4) fixes as well right since its breaking changes?
I'm not quite sure why the downstream tests are passing - something may not be working correctly with them....
Remove Struct from Types and use PORO instead. RBS caught issues now that struct isn't being used, including fixing documents and string maps which had symbolized keys