From 30531390db30667b95273ea5c88cd911d3b17fa4 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Sat, 8 Jul 2023 21:42:27 -0400 Subject: [PATCH 01/18] enable explicit nulls in community build --- community-build/src/scala/dotty/communitybuild/projects.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/community-build/src/scala/dotty/communitybuild/projects.scala b/community-build/src/scala/dotty/communitybuild/projects.scala index ae030dc66336..4e162e698e75 100644 --- a/community-build/src/scala/dotty/communitybuild/projects.scala +++ b/community-build/src/scala/dotty/communitybuild/projects.scala @@ -150,6 +150,7 @@ object SbtCommunityProject: def scalacOptions = List( "-Xcheck-macros", "-Ysafe-init", + "-Yexplicit-nulls", ) object projects: From d00a0d072962793071a480140865386abc2316eb Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 12 Apr 2024 16:27:45 -0400 Subject: [PATCH 02/18] changes to compile scalacheck with -Yexplicit-nulls --- community-build/community-projects/scalacheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/scalacheck b/community-build/community-projects/scalacheck index fbfaabd7b628..c72a6fd1c4b8 160000 --- a/community-build/community-projects/scalacheck +++ b/community-build/community-projects/scalacheck @@ -1 +1 @@ -Subproject commit fbfaabd7b628e9b0d8f78ed8a91a0672cf56ba15 +Subproject commit c72a6fd1c4b8118401d86c24a9ba995b5aafeed6 From bbad25163fdfb2de7d4fdb1e0f3dd14166e612f3 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Thu, 13 Jul 2023 09:59:37 -0400 Subject: [PATCH 03/18] changes to compile endpoints4s with -Yexplicit-nulls --- community-build/community-projects/endpoints4s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/endpoints4s b/community-build/community-projects/endpoints4s index 3a667a3608ff..af057da29fc8 160000 --- a/community-build/community-projects/endpoints4s +++ b/community-build/community-projects/endpoints4s @@ -1 +1 @@ -Subproject commit 3a667a3608ff9950c24e9b2b5038c71c1690a21d +Subproject commit af057da29fc81344f4316c300198e9bdcae85006 From 088c0af5fae6c594900efff316ce50db3a8048df Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Thu, 13 Jul 2023 09:45:25 -0400 Subject: [PATCH 04/18] add fromNullable method to object Option --- library/src/scala/runtime/stdLibPatches/Predef.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/library/src/scala/runtime/stdLibPatches/Predef.scala b/library/src/scala/runtime/stdLibPatches/Predef.scala index 2146254a9467..3d8a2a2cb8a5 100644 --- a/library/src/scala/runtime/stdLibPatches/Predef.scala +++ b/library/src/scala/runtime/stdLibPatches/Predef.scala @@ -62,4 +62,5 @@ object Predef: * `eq` or `ne` methods, only `==` and `!=` inherited from `Any`. */ inline def ne(inline y: AnyRef | Null): Boolean = !(x eq y) + extension (inline opt: Option.type) inline def fromNullable[T](t: T|Null): Option[T] = Option(t).asInstanceOf end Predef From f489361bcace9bb3e8762ec3a4d9b9e2279bcd41 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Thu, 20 Jul 2023 16:45:23 -0400 Subject: [PATCH 05/18] changes to compile intent with -Yexplicit-nulls --- community-build/community-projects/intent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/intent b/community-build/community-projects/intent index 466662fb36ed..ab0fad2340eb 160000 --- a/community-build/community-projects/intent +++ b/community-build/community-projects/intent @@ -1 +1 @@ -Subproject commit 466662fb36ed38d1f045449682bdc109496c6b2d +Subproject commit ab0fad2340eb3966fda4203cf79d29b50994069d From 7eb87754fd63a49c5f52236fde89fd1655b250b4 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 12 Apr 2024 21:29:42 -0400 Subject: [PATCH 06/18] changes to compile verify with -Yexplicit-nulls --- community-build/community-projects/verify | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/verify b/community-build/community-projects/verify index ae37d7e153fc..539530784b05 160000 --- a/community-build/community-projects/verify +++ b/community-build/community-projects/verify @@ -1 +1 @@ -Subproject commit ae37d7e153fc62d64c40a72c45f810511aef2e01 +Subproject commit 539530784b05897fa884dece3932197f430f9564 From 37c9da9e685b7a8800460f6e1b46e9395952758e Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 12 Apr 2024 21:38:38 -0400 Subject: [PATCH 07/18] changes to compile munit with -Yexplicit-nulls --- community-build/community-projects/munit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/munit b/community-build/community-projects/munit index 5c77d7316fc6..fec8b75ff69b 160000 --- a/community-build/community-projects/munit +++ b/community-build/community-projects/munit @@ -1 +1 @@ -Subproject commit 5c77d7316fc66adaed64e9532ee0a45a668b01ec +Subproject commit fec8b75ff69b43000cc9297e73506f8b1abfc0de From fef10b44074ccfd09187e1e30de1ce43c294b3ee Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 21 Jul 2023 22:56:34 -0400 Subject: [PATCH 08/18] disable explicit nulls for scalaXml --- community-build/src/scala/dotty/communitybuild/projects.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/community-build/src/scala/dotty/communitybuild/projects.scala b/community-build/src/scala/dotty/communitybuild/projects.scala index 4e162e698e75..aa3748404c3b 100644 --- a/community-build/src/scala/dotty/communitybuild/projects.scala +++ b/community-build/src/scala/dotty/communitybuild/projects.scala @@ -320,7 +320,8 @@ object projects: project = "scala-xml", sbtTestCommand = "xml/test", sbtPublishCommand = "xml/publishLocal", - sbtDocCommand = "xml/doc" + sbtDocCommand = "xml/doc", + scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Yexplicit-nulls"), ) lazy val scalap = SbtCommunityProject( From 793d7d5e1f499cfe73a6c40fe2fa54874058352d Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 12 Apr 2024 21:50:10 -0400 Subject: [PATCH 09/18] changes to make scalaParserCombinators compile with -Yexplicit-nulls --- community-build/community-projects/scala-parser-combinators | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/scala-parser-combinators b/community-build/community-projects/scala-parser-combinators index f2f0b4f89e1f..1253ea3c8519 160000 --- a/community-build/community-projects/scala-parser-combinators +++ b/community-build/community-projects/scala-parser-combinators @@ -1 +1 @@ -Subproject commit f2f0b4f89e1fc0ffb67bbc3f93567b866880a01b +Subproject commit 1253ea3c8519fe1001a7b01d34711e17d1b9a394 From 81090ef61658ddd381df8f98d621aa5b27357261 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 12 Apr 2024 21:51:50 -0400 Subject: [PATCH 10/18] changes to make scodec-bits compile with -Yexplicit-nulls --- community-build/community-projects/scodec-bits | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/scodec-bits b/community-build/community-projects/scodec-bits index 5081dc10310d..d539c937316e 160000 --- a/community-build/community-projects/scodec-bits +++ b/community-build/community-projects/scodec-bits @@ -1 +1 @@ -Subproject commit 5081dc10310dc2010d3b968c2772d72b57eb7d1c +Subproject commit d539c937316e076f768c618fb3d762052f7639ba From 4c9e506081439f1964eb11e83afa5c393b519b02 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 12 Apr 2024 21:53:15 -0400 Subject: [PATCH 11/18] changes to make scodec compile with -Yexplicit-nulls --- community-build/community-projects/scodec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/scodec b/community-build/community-projects/scodec index 96a77ecaaf91..7e6e9c819169 160000 --- a/community-build/community-projects/scodec +++ b/community-build/community-projects/scodec @@ -1 +1 @@ -Subproject commit 96a77ecaaf913f195bb4079966a2e9fb41ce214e +Subproject commit 7e6e9c81916930469a6a4fafa05fcca210a6e855 From c003e251cfd24066c35de40684a4db3d72c5015e Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 12 Apr 2024 22:01:42 -0400 Subject: [PATCH 12/18] changes to make minitest compile with -Yexplicit-nulls --- community-build/community-projects/minitest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/minitest b/community-build/community-projects/minitest index fb23874c030f..27a9a5504444 160000 --- a/community-build/community-projects/minitest +++ b/community-build/community-projects/minitest @@ -1 +1 @@ -Subproject commit fb23874c030fea4f8d6b160fd4df45bde71ca02b +Subproject commit 27a9a55044445e9acd96f1ce86240ef0d6fbae1f From e158adaf6d42d96f857957d8efea7b9fbb54f2c0 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 12 Apr 2024 22:03:37 -0400 Subject: [PATCH 13/18] changes to make scala-collection-compat compile with -Yexplicit-nulls --- community-build/community-projects/scala-collection-compat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/scala-collection-compat b/community-build/community-projects/scala-collection-compat index b39b4b64732d..7ba80be2439f 160000 --- a/community-build/community-projects/scala-collection-compat +++ b/community-build/community-projects/scala-collection-compat @@ -1 +1 @@ -Subproject commit b39b4b64732d9dd5e0f065e4180f656237ac4444 +Subproject commit 7ba80be2439f22577502ca01432a99853867ee01 From c94cb7ec2ebdb806b199d17c028fdacd1c1cc5b3 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Mon, 15 Apr 2024 10:33:55 -0400 Subject: [PATCH 14/18] changes to make cats compile with -Yexplicit-nulls --- community-build/community-projects/cats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/cats b/community-build/community-projects/cats index 771c6c802f59..46458272d33c 160000 --- a/community-build/community-projects/cats +++ b/community-build/community-projects/cats @@ -1 +1 @@ -Subproject commit 771c6c802f59c72dbc1be1898081c9c882ddfeb0 +Subproject commit 46458272d33c136a7c2d60646040679ce63c67d5 From c47ee77e11a12a57acf8a3e397036f5fd735ba80 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Mon, 15 Apr 2024 10:41:15 -0400 Subject: [PATCH 15/18] changes to make cats-effect-3 compile with -Yexplicit-nulls --- community-build/community-projects/cats-effect-3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/cats-effect-3 b/community-build/community-projects/cats-effect-3 index 1d425e6efdf8..ab116dc954b6 160000 --- a/community-build/community-projects/cats-effect-3 +++ b/community-build/community-projects/cats-effect-3 @@ -1 +1 @@ -Subproject commit 1d425e6efdf8aee619a4a906e950473c51f78161 +Subproject commit ab116dc954b65a0799c6475055a77e0968af82a7 From f9772fd77dd742b81e923190997c7e2bba0f48a0 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Mon, 15 Apr 2024 14:41:01 -0400 Subject: [PATCH 16/18] disable explicit nulls for scalatest This is because scalatest uses scala-xml and we compiled that without explicit nulls. Ideally we would use flexible types on Scala code compiled without explicit nulls, in addition to on Java-defined code. Then it might be feasible to port scalatest to explicit nulls. --- community-build/src/scala/dotty/communitybuild/projects.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/community-build/src/scala/dotty/communitybuild/projects.scala b/community-build/src/scala/dotty/communitybuild/projects.scala index aa3748404c3b..41c95f058e18 100644 --- a/community-build/src/scala/dotty/communitybuild/projects.scala +++ b/community-build/src/scala/dotty/communitybuild/projects.scala @@ -291,7 +291,8 @@ object projects: // Problem parsing scalatest.dotty/target/scala-3.0.0-M2/src_managed/main/org/scalatest/concurrent/ConductorFixture.scala:[602..624..3843], documentation may not be generated. // dotty.tools.dotc.core.MissingType: dependencies = List(scalaXml), - testOnlyDependencies = () => List(scalatestplusJunit, scalatestplusTestNG) + testOnlyDependencies = () => List(scalatestplusJunit, scalatestplusTestNG), + scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Yexplicit-nulls") ) lazy val scalatestplusScalacheck = SbtCommunityProject( From 6cbbfcf3e46165163efcb9c2c3103662db3fd175 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Fri, 28 Jul 2023 22:41:10 -0400 Subject: [PATCH 17/18] changes to make scalatestplus-scalacheck compile with -Yexplicit-nulls --- community-build/community-projects/scalatestplus-scalacheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/scalatestplus-scalacheck b/community-build/community-projects/scalatestplus-scalacheck index 32e7dc67a949..ee5c16198f03 160000 --- a/community-build/community-projects/scalatestplus-scalacheck +++ b/community-build/community-projects/scalatestplus-scalacheck @@ -1 +1 @@ -Subproject commit 32e7dc67a9490147e6a04be9125c3ef0940d6819 +Subproject commit ee5c16198f03f49d69b3de2b03605dd05434b8c6 From 43e8bbc8c0d4a3ba8593c6d0c2674615782b34ac Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Thu, 27 Jul 2023 10:42:32 -0400 Subject: [PATCH 18/18] changes to make scalatestplusjunit compile with -Yexplicit-nulls --- community-build/community-projects/scalatestplus-junit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/scalatestplus-junit b/community-build/community-projects/scalatestplus-junit index ce02c8628b56..e5b13957c774 160000 --- a/community-build/community-projects/scalatestplus-junit +++ b/community-build/community-projects/scalatestplus-junit @@ -1 +1 @@ -Subproject commit ce02c8628b56c18e3df5405af6084a9e092423be +Subproject commit e5b13957c77448a3f953836980695dbc1658b9ab