Commit aed2582
committed
Only run macro tests with a bootstrapped compiler
Compiling a macro with a non-bootstrapped compiler is fine, but running
that macro in a subsequent compiler run as is usually done in macro
tests is problematic since the MacroClassLoader is created using the
compiler classpath (which contains a bootstrapped library) with the
regular JVM classpath as parent classloader (which contains a
non-bootstrapped library), this is inconsistent and could lead to various
weird problems depending on the order in which things get loaded.
One possible way to run these tests would be to always put the
bootstrapped library on the JVM classpath, even if we're using the
non-bootstrapped compiler, but this would cause test failures every time
we would break binary compatibility.
Instead, this commit moves the relevant tests to {pos,neg,run}-macros
which will only be run with a bootstrapped compiler. To speed up
development, it might be useful to add a flag to `testCompilation` that
would put the bootstrapped library on the JVM classpath and still run
these tests, but this is left as future work.1 parent 3db70e6 commit aed2582
File tree
320 files changed
+17
-6
lines changed- compiler/test/dotty/tools/dotc
- tests
- neg-macros
- inline-case-objects
- inline-macro-staged-interpreter
- inline-option
- inline-tuples-1
- quote-error-2
- quote-error
- quote-exception
- quote-whitebox
- tasty-macro-assert-1
- tasty-macro-assert-2
- tasty-macro-error
- tasty-macro-positions
- tasty-string-interpolator-position-a
- tasty-string-interpolator-position-b
- pos-macros
- i3898b
- i3898c
- i3898
- i3912-1
- i3912-2
- i4023b
- i4023c
- i4023
- i4734
- i6171
- i6210
- macro-with-array
- macro-with-type
- power-macro
- quote-lift-inline-params
- quote-nested-object
- quote-whitebox-2
- tasty-constant-type
- run-macros
- f-interpolation-1
- gestalt-optional-staging
- gestalt-type-toolbox-reflect
- i4431
- i4455
- i4492
- i4515b
- i4515
- i4734
- i4735
- i4803b
- i4803c
- i4803e
- i4803f
- i4803
- i4947e
- i4947f
- i5119b
- i5119
- i5188a
- i5533b
- i5533
- i5536
- i5629
- i5715
- i5941
- i6171
- i6253-b
- i6253
- inferred-repeated-result
- inline-case-objects
- inline-macro-staged-interpreter
- inline-option
- inline-tuples-1
- inline-tuples-2
- inline-varargs-1
- quote-and-splice
- quote-change-owner
- quote-elide-prefix
- quote-force
- quote-impure-by-name
- quote-indexed-map-by-name
- quote-inline-function
- quote-matcher-runtime
- quote-matcher-string-interpolator-2
- quote-matcher-string-interpolator
- quote-matcher-symantics-1
- quote-matcher-symantics-2
- quote-sep-comp-2
- quote-sep-comp
- quote-simple-macro
- quote-unrolled-foreach
- quote-whitebox
- reflect-select-constructor
- reflect-select-copy
- reflect-select-copy
- reflect-select-value-class
- reflect-typeChecks
- tasty-argument-tree-1
- tasty-custom-show
- tasty-dealias
- tasty-definitions-1
- tasty-eval
- tasty-extractors-1
- tasty-extractors-2
- tasty-extractors-3
- tasty-extractors-constants-1
- tasty-extractors-types
- tasty-getfile-implicit-fun-context
- tasty-getfile
- tasty-implicit-fun-context-2
- tasty-indexed-map
- tasty-interpolation-1
- tasty-linenumber-2
- tasty-linenumber
- tasty-location
- tasty-macro-assert
- tasty-macro-const
- tasty-macro-positions
- tasty-original-source
- tasty-positioned
- tasty-seal-method
- tasty-subtyping
- tasty-tree-map
- tasty-typeof
- type-show
- xml-interpolation-1
- xml-interpolation-2
- xml-interpolation-3
- xml-interpolation-4
- run-with-compiler
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
320 files changed
+17
-6
lines changedLines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
72 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
73 | 83 | | |
74 | 84 | | |
75 | 85 | | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
79 | 94 | | |
80 | 95 | | |
81 | 96 | | |
| |||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments