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

chore: Add support for Scala 2.12.16 #4010

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ coursier fetch \
org.scalameta:mtags_2.12.13:$version \
org.scalameta:mtags_2.12.14:$version \
org.scalameta:mtags_2.12.15:$version \
org.scalameta:mtags_2.12.16:$version \
org.scalameta:mtags_2.11.12:$version $suffix
5 changes: 3 additions & 2 deletions project/V.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import sbt._
object V {
val scala210 = "2.10.7"
val scala211 = "2.11.12"
val scala212 = "2.12.15"
val scala212 = "2.12.16"
val scala213 = "2.13.8"
val scala3 = "3.1.2"
val nextScala3RC = "3.1.3-RC4"
val sbtScala = "2.12.14"
val ammonite212Version = scala212
val ammonite212Version = "2.12.15"
Copy link
Member

Choose a reason for hiding this comment

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

Why ammonite 2.12 stays on 2.12.15?

Copy link
Contributor Author

@tgodzik tgodzik Jun 8, 2022

Choose a reason for hiding this comment

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

Ammonite is not yet available for 2.12.16

val ammonite213Version = "2.13.7"

val ammonite = "2.5.4"
Expand Down Expand Up @@ -73,6 +73,7 @@ object V {
def nonDeprecatedScala2Versions = Seq(
scala213,
scala212,
"2.12.15",
"2.12.14",
"2.12.13",
"2.12.12",
Expand Down
22 changes: 21 additions & 1 deletion tests/cross/src/test/scala/tests/pc/MacroCompletionSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,28 @@ class MacroCompletionSuite extends BaseCompletionSuite {
""
)

/* Starting with Scala 2.12.16 we are getting
* Select(
* TypeApply(
* Ident(baz),
* List(
* ExistentialTypeTree(
* AppliedTypeTree(Ident(Either), List(Ident(Int), Ident($qmark$1))),
* List(
* TypeDef(Modifiers(2097168L, , List()), $qmark$1, List(), TypeBoundsTree(<empty>, <empty>))
* )
* ),
* Ident(String)
* )
* ),
* fold_CURSOR_
* )
*
* The compiler seems unable to deal with getting type members of ExistentialTypeTree.
* This requires a fix in the compiler, but I doubt anyone will have the time to take a look.
*/
check(
"kind-projector",
"kind-projector".tag(IgnoreScalaVersion("2.12.16")),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried fixing it, but this would require a lot of work and I would rather focus on Scala 3 when fixing error in the compiler.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe turn it into an issue?

Copy link
Contributor

@armanbilge armanbilge Jun 9, 2022

Choose a reason for hiding this comment

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

What does this mean in practice? Will metals users have issues with kind-projector on Scala 2.12.16?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe turn it into an issue?

I mean, I could, but in reality I don't think it will be a high priority for anyone, so we would need to fix it ourselves :/ I will raise i , maybe someone has some ideas.

What does this mean in practice? Will metals users have issues with kind-projector on Scala 2.12.16?

I actually updated to the newest version and it seems the users already have issues 😓 At least for this particular case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"""
|object a {
| def baz[F[_], A]: F[A] = ???
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/src/test/scala/tests/FormattingLspSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ class FormattingLspSuite extends BaseLspSuite("formatting") {
s"""|/metals.json
|{
| "a": {
| "scalaVersion": "2.12.15"
| "scalaVersion": "${V.scala212}"
| },
| "b": {
| "scalaVersion": "2.12.15",
| "scalaVersion": "${V.scala212}",
| "scalacOptions": ["-Xsource:3"],
| "sbtVersion": "1.6.0-RC2"
| }
Expand Down