question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with scala3 `*` imports and IntelliJ

See original GitHub issue

Hi,

IntelliJ organises the imports this way:

import zio.test.*
import zio.test.Assertion.*

while OrganizeImports organises them this way:

import zio.test.Assertion.*
import zio.test.*

Here’s my scalafix config concerning OrganizeImports:

OrganizeImports {
  # Allign with IntelliJ IDEA so that they don't fight each other
  groupedImports = Merge
}

I feel that IntelliJ is right on this one. What do you thing?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mihaisoloicommented, Mar 13, 2022

To add to this, removeUnused doesn’t work for imports that are specified using the * wildcard.

1reaction
lianchengcommented, Aug 18, 2021

@guizmaii, what I can confirm is that OrganizeImports does not handle the Scala 3 * wildcard properly when sorting imports. What OrganizeImports does when SymbolsFirst is used is to replace underscores and braces with \u0001 and \u0002 followed by a normal lexicographical sorting. The * wildcard is not handled yet.

But I haven’t figured out how exactly the result you hit was produced. Need some more time for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

scala 3 syntax not recognized when opening the project ...
scala 3 syntax not recognized when opening the project already imported in 2019.3. 5. Relates to 8 Depends on 1. Relates to 8...
Read more >
IntelliJ IDEA - Troubleshoot common Scala issues - JetBrains
Check the following answers on most common scala/sbt questions that can help you solve compiler, performance or code highlighting issues you might come ......
Read more >
Unable to import Scala 3 1.6.2 SBT project - YouTrack
Steps to reproduce the issue. System: MacOS Big Sur 11.5.2, Apple M1. Intellij Idea Ultimate version: 2022.1.1. Scala Plugin version: 2022.1.16.
Read more >
Scala 3 project using too much CPU in 2022.2 : SCL-20457
Problem description. Since the 2022.2 IntelliJ update, opening Scala 3 files often leads to 100% CPU usage for several minutes.
Read more >
Scala 3 support in IntelliJ Scala plugin - The JetBrains Blog
We added basic Dotty support in the IntelliJ Scala plugin a long time ago, right after the announcement of Dotty.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found