File tree 3 files changed +8
-17
lines changed
src/dotty/tools/dotc/config
3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -215,16 +215,4 @@ object Config {
215
215
* reduces the number of allocated denotations by ~50%.
216
216
*/
217
217
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
230
218
}
Original file line number Diff line number Diff line change @@ -97,11 +97,16 @@ object Feature:
97
97
else
98
98
false
99
99
100
- def compilerSupportsExperimental (using Context ) =
101
- Config .compilerSupportsExperimental && ! ctx.settings.YnoExperimental .value
100
+ private val assumeExperimentalIn = Set (" dotty.tools.vulpix.ParallelTesting" )
102
101
103
102
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%")
105
110
report.error(i " Experimental feature $which may only be used with nightly or snapshot version of compiler " , srcPos)
106
111
107
112
/** 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
39
39
trait ParallelTesting extends RunnerOrchestration { self =>
40
40
import ParallelTesting ._
41
41
42
- Config .compilerSupportsExperimental = true
43
-
44
42
/** If the running environment supports an interactive terminal, each `Test`
45
43
* will be run with a progress bar and real time feedback
46
44
*/
You can’t perform that action at this time.
0 commit comments