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

GenIdea: Improved Scala 3 Support #1486

Merged
merged 9 commits into from
Sep 24, 2021
Merged

Conversation

lefou
Copy link
Member

@lefou lefou commented Sep 21, 2021

Implement language-level property for Scala library in IntelliJ IDEA.

@lefou
Copy link
Member Author

lefou commented Sep 23, 2021

@informarte I hopefully improved the situation this time.

Comment on lines +313 to +318
.flatMap(y =>
y._2.map {
case (path, 0) => path -> y._1
case (path, idx) => path -> s"${y._1} (${idx})"
}
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Leaving out the index for the first element fixed failing tests on WIndows, where for unknown reasons we always ended up with a scala-library-2.13.6.jar (0).

Comment on lines 462 to 470
case _ if compilerCp.iterator.isEmpty => None
case _ if name.startsWith("scala3-library_3-3.0.") => Some("Scala_3_0")
case _ if name.startsWith("scala-library-2.13.") => Some("Scala_2_13")
case _ if name.startsWith("scala-library-2.12.") => Some("Scala_2_12")
case _ if name.startsWith("scala-library-2.11.") => Some("Scala_2_11")
case _ if name.startsWith("scala-library-2.10.") => Some("Scala_2_10")
case _ if name.startsWith("scala-library-2.9.") => Some("Scala_2_9")
case _ if name.startsWith("dotty-version-0.27") => Some("Scala_0_27")
case _ => None
Copy link
Member Author

Choose a reason for hiding this comment

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

Decided to hardcode the mapping, as Scala 3 support in IJ is still in development and it's a bit unclear if we settle with the current mapping or not.

@lefou lefou merged commit 5266b79 into com-lihaoyi:main Sep 24, 2021
@lefou lefou deleted the idea-scala-3 branch September 24, 2021 06:43
@lefou lefou added this to the after 0.10.0-M2 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants