rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

fix #6164: Reduce format failure for non default `imports_granularity`

Open kenoss opened this issue 1 year ago • 14 comments

Fixed: #6164

This patch reduces format failure for non default imports_granularity and correct the behavior around some edge cases.

  • Supports too long line of use ... that contains {}.
  • Fixes the width calculation of too long lines of use ....

kenoss avatar May 19 '24 18:05 kenoss

Thank you for quick look!

I'll rethink and refactor. I'll mention once I've done.

kenoss avatar May 21 '24 14:05 kenoss

@ytmimi Could you have a look? Thanks!

kenoss avatar May 23 '24 13:05 kenoss

@ytmimi Could you have a look? Thanks!

I really appreciate you taking the time to make these changes. As I mentioned in https://github.com/rust-lang/rustfmt/pull/6165#pullrequestreview-2067260236 I likely won't have time to re-review this for a little while, and I'll follow up when I can

ytmimi avatar May 24 '24 14:05 ytmimi

np. Take your time.

kenoss avatar May 24 '24 17:05 kenoss

Rebased and conflict resolved. Updated using RewriteResult/RewriteError.

kenoss avatar Aug 20 '24 17:08 kenoss

This is a friendly ping.

Three months passed.

@ytmimi Could you have a look? Let me know if I can help.

kenoss avatar Aug 20 '24 17:08 kenoss

@kenoss I know it's been some time, but I unfortunately haven't had the bandwidth. Right now my main focus is getting rustfmt ready for the upcoming edition release, mentoring the GSoC project, triaging issues, and working on smaller bugfixes. I appreciate your patience on this.

ytmimi avatar Aug 20 '24 17:08 ytmimi

I understand your situation. (But... I wonder why don't you add more reviewers? It looks other PRs also are stuck with review.)

OK. Then, I'll pause to make this PR fresh. Let me know when you can review. Then, I'll rebase it.

kenoss avatar Aug 20 '24 18:08 kenoss

@ytmimi Friendly ping in 2024 year end. I happened to notice that you are reviewing some PRs. Do you mind to take time to review this PR?

I rebased it onto near HEAD. (Commit 8a2c0739 is not working on my environment. Rebased to HEAD~.)

I replaced .offset_left() of original PR to .offset_left_opt(). (See commit 1d1fb660.) It looks OK as this path is not yet properly result-fied. I'm willing to make use results in this path in another PR if you have review bandwidth.

Thanks.

kenoss avatar Dec 17 '24 16:12 kenoss

@kenoss Thanks for taking the time to rebase the PR. At the moment this is a lower priority item for the team and I don't anticipate I'll get around to reviewing the implementation before the end of the year. It's hard to say when exactly I'll be able to revisit this one, but I'll be sure to reach out when I do.

ytmimi avatar Dec 18 '24 21:12 ytmimi

Thank you for taking time!

FYI, it's a blocker for me to upstream it because I need it for CI. I don't want to diverge it.

kenoss avatar Dec 21 '24 21:12 kenoss

Thanks! Comment added. All review comments resolved. (I'm not familiar with GitHub and a way of this repository. Which should I or you do Resolve conversation? I'll leave them.)

kenoss avatar Dec 28 '24 14:12 kenoss

Yes, you can Resolve conversation the outdated conversation

chansuke avatar Dec 31 '24 14:12 chansuke

Rebased to current HEAD (fd0ea74) for projects using 2024 edition.

kenoss avatar May 13 '25 13:05 kenoss