Skip to content
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

fix oboe wrapping struct field comments #6242

Closed
wants to merge 1 commit into from

Conversation

izyuumi
Copy link

@izyuumi izyuumi commented Jul 16, 2024

Fixes: #6180

Copy link
Contributor

@ytmimi ytmimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to come up with another approach to resolve this issue. Also, when you get a chance can you please add the original code snippet from #6180 as a test case.

let item_shape = Shape::indented(offset, context.config).sub_width(1)?;
let item_shape = Shape::indented(offset, context.config).sub_width(0)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the correct approach. First because CI is failing, but also because we .sub_width(1) to make sure that the field + trailing comma doesn't exceed the max_width. I think you'll need to look a little deeper into this to understand what shape gets used to rewrite the comments.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ytmimi Thanks for the review. Will try to look deeper into this issue!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to reach out here or on Zulip if you have any questions

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ytmimi
Copy link
Contributor

ytmimi commented Sep 12, 2024

Going to close this as we're not moving forward with this PR as currently implemented.

@ytmimi ytmimi closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Off-by-one error wrapping comments on struct field
3 participants