File tree Expand file tree Collapse file tree 3 files changed +8
-17
lines changed
src/dotty/tools/dotc/config Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -215,16 +215,4 @@ object Config {
215215 * reduces the number of allocated denotations by ~50%.
216216 */
217217 inline val reuseSymDenotations = true
218-
219- /** Turn on in order to test the CI assuming we have a stable release compiler
220- * instead of a nightly or snapshot.
221- */
222- private val assumeNonExperimentalCompiler = false
223-
224- /** Are experimental features are allowed? By default same as
225- * `Properties.experimental`. Can be re-assigned, e.g. to allow tests
226- * of experimental features.
227- */
228- @ sharable private [dotty] var compilerSupportsExperimental =
229- Properties .experimental && ! assumeNonExperimentalCompiler
230218}
Original file line number Diff line number Diff line change @@ -97,11 +97,16 @@ object Feature:
9797 else
9898 false
9999
100- def compilerSupportsExperimental (using Context ) =
101- Config .compilerSupportsExperimental && ! ctx.settings.YnoExperimental .value
100+ private val assumeExperimentalIn = Set (" dotty.tools.vulpix.ParallelTesting" )
102101
103102 def checkExperimentalFeature (which : String , srcPos : SrcPos = NoSourcePosition )(using Context ) =
104- if ! compilerSupportsExperimental then
103+ def hasSpecialPermission =
104+ new Exception ().getStackTrace.exists(elem =>
105+ assumeExperimentalIn.exists(elem.getClassName().startsWith(_)))
106+ if ! (Properties .experimental || hasSpecialPermission)
107+ || ctx.settings.YnoExperimental .value
108+ then
109+ // println(i"${new Exception().getStackTrace.map(_.getClassName).toList}%\n%")
105110 report.error(i " Experimental feature $which may only be used with nightly or snapshot version of compiler " , srcPos)
106111
107112 /** Check that experimental compiler options are only set for snapshot or nightly compiler versions. */
Original file line number Diff line number Diff line change @@ -39,8 +39,6 @@ import dotty.tools.vulpix.TestConfiguration.defaultOptions
3939trait ParallelTesting extends RunnerOrchestration { self =>
4040 import ParallelTesting ._
4141
42- Config .compilerSupportsExperimental = true
43-
4442 /** If the running environment supports an interactive terminal, each `Test`
4543 * will be run with a progress bar and real time feedback
4644 */
You can’t perform that action at this time.
0 commit comments