-
Notifications
You must be signed in to change notification settings - Fork 192
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
Attribute.Custom.render()
is stripping comment line chars //
#1465
Comments
@david-perez pointed out it'd fail if |
so the relevant difference here is that raw uses So when the writer isn't on a newline, that get suppressed. Let me see if I can make a fix |
rcoh
added a commit
that referenced
this issue
Jun 15, 2022
rcoh
added a commit
that referenced
this issue
Jun 15, 2022
rcoh
added a commit
that referenced
this issue
Jun 15, 2022
crisidev
pushed a commit
that referenced
this issue
Jun 15, 2022
Velfi
pushed a commit
that referenced
this issue
Jun 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am facing a weird issue with the
Attribute
class:I am trying to render a
Custom
attribute before structures and enums and if there is a comment line rendered just after my call toAttribute.Custom.render()
, the//
is eaten away.I have tracked it down to this line of code: https://github.com/awslabs/smithy-rs/blob/15e1b3425f56ff2606121e99dff11de38424c744/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustTypes.kt#L377
If I change the line from writer.raw("#$bang[$annotation]") to writer.rust("##$bang[$annotation]") it start rendering as I would expect, but I am not sure of the implications of changing this line of code.
The text was updated successfully, but these errors were encountered: