Skip to content

Commit 6ba7425

Browse files
committed
Assume experimental compiler support in CommunityBuildTests
I noted that several community build tests (not just scodec) require experimental features. We need to decide what the policy should be 1. allow them by default, and tests can opt into non-experimental with -Yno-experimental? 2. keep the standard policy, and don't run certain tests when run with an unstable compiler If it's (2), we need a lot some more work on the community build to adapt all the tests that would fail otherwise.
1 parent e5bcb1a commit 6ba7425

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ import java.nio.charset.StandardCharsets.UTF_8
66
import org.junit.{Ignore, Test}
77
import org.junit.Assert.{assertEquals, fail}
88
import org.junit.experimental.categories.Category
9+
import dotty.tools.dotc.config.Config
910

1011
abstract class CommunityBuildTest:
1112
given CommunityBuildTest = this
1213

14+
Config.compilerSupportsExperimental = true // individual tests can turn experimental off by setting -Yno-experimental
15+
1316
/** Depending on the mode of operation, either
1417
* runs the test or updates the project. Updating
1518
* means that all the dependencies are fetched but
@@ -116,7 +119,7 @@ class CommunityBuildTestB extends CommunityBuildTest:
116119
@Test def disciplineSpecs2 = projects.disciplineSpecs2.run()
117120
@Test def munit = projects.munit.run()
118121
@Test def perspective = projects.perspective.run()
119-
@Test def scodec = if (compilerSupportExperimental) projects.scodec.run()
122+
@Test def scodec = if compilerSupportExperimental then projects.scodec.run()
120123
@Test def scodecBits = projects.scodecBits.run()
121124
@Test def simulacrumScalafixAnnotations = projects.simulacrumScalafixAnnotations.run()
122125
end CommunityBuildTestB

0 commit comments

Comments
 (0)