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

Change importSelectors to binpack style with Scalafmt 3.8 #6674

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bowenliang123
Copy link
Contributor

@bowenliang123 bowenliang123 commented Sep 5, 2024

🔍 Description

Issue References 🔗

This pull request fixes #

Describe Your Solution 🔧

Without this PR:

  • use and conform Scalafmt 3.7.x
  • forcing all the imports from the same parent package, which is even violation the max length of the line

With this PR:

importSelectors=binpack in Scalafmt 3.8: Forcing {} wrapper in extra line

import abc.def.xyz{
    ..., ... , ..., ..., ... , ..., ..., ... , ..., ..., ... , ...,
}

importSelectors= singleLine in Scalafmt 3.8: Forcing extra line break before last parent package name.
(which is also disorder the dep groups and IDE display)

import abc.def
    .xyz.{ ..., ... , ..., ..., ... , ..., ..., ... , ..., ..., ...}

Types of changes 🔖

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Test Plan 🧪

Behavior Without This Pull Request ⚰️

Behavior With This Pull Request 🎉

Related Unit Tests


Checklist 📝

Be nice. Be informative.

@codecov-commenter
Copy link

codecov-commenter commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (8056235) to head (762daab).

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #6674   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         684     684           
  Lines       42279   42279           
  Branches     5765    5765           
======================================
  Misses      42279   42279           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pan3793
Copy link
Member

pan3793 commented Sep 6, 2024

I'm surprised that scalafmt made such a breaking change. Maybe it's time to discuss Kyuubi 2.0, and we can consider including this change in 2.0 and keeping the existing behavior on 1.x serials.

@bowenliang123
Copy link
Contributor Author

bowenliang123 commented Sep 6, 2024

I agree. This PR is more about a demonstration for the impact of scalafmt 3.8, which is no hurry to be merged for now.

@bowenliang123 bowenliang123 changed the title Change importSelectors to binpack style with Scalafmt bumped to 3.8 Change importSelectors to binpack style with Scalafmt 3.8 Sep 6, 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.

4 participants